40 lines
1021 B
C#
40 lines
1021 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using ChaosBot.Database.Entity;
|
|
|
|
namespace ChaosBot.Database.Repository
|
|
{
|
|
public static class RaffleRepository
|
|
{
|
|
private static readonly string Table = "RaffleTable";
|
|
|
|
// public static Raffle[] all()
|
|
// {
|
|
//
|
|
// }
|
|
|
|
public static void insert(Raffle raffle)
|
|
{
|
|
Dictionary<string, object> dict = new Dictionary<string, object>();
|
|
|
|
dict.Add("userId", raffle.userId);
|
|
|
|
Controller.InsertQuery(Table, dict);
|
|
}
|
|
|
|
public static void massInsert(Raffle raffle, int amount)
|
|
{
|
|
Dictionary<string, object> dict = new Dictionary<string, object>();
|
|
|
|
dict.Add("userId", raffle.userId);
|
|
|
|
for (int i = 0; i < amount; i++)
|
|
Controller.InsertQuery(Table, dict);
|
|
}
|
|
|
|
// public static void delete()
|
|
// {
|
|
//
|
|
// }
|
|
}
|
|
} |