From 146eba94f6406e955fa09bf7c7793daa9b58a4fc Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Thu, 4 Jun 2020 01:18:10 +0200 Subject: [PATCH] Add mass insert --- ChaosBot/Database/Repository/RaffleRepository.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ChaosBot/Database/Repository/RaffleRepository.cs b/ChaosBot/Database/Repository/RaffleRepository.cs index 5b06506..a3df9cd 100644 --- a/ChaosBot/Database/Repository/RaffleRepository.cs +++ b/ChaosBot/Database/Repository/RaffleRepository.cs @@ -22,6 +22,16 @@ namespace ChaosBot.Database.Repository Controller.InsertQuery(Table, dict); } + public static void massInsert(Raffle raffle, int amount) + { + Dictionary dict = new Dictionary(); + + dict.Add("userId", raffle.userId); + + for (int i = 0; i < amount; i++) + Controller.InsertQuery(Table, dict); + } + // public static void delete() // { //