mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Removed poll repository
This commit is contained in:
@@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Games.Services
|
||||
|
||||
using (var uow = db.GetDbContext())
|
||||
{
|
||||
ActivePolls = uow.Polls.GetAllPolls()
|
||||
ActivePolls = uow._context.Poll.GetAllPolls()
|
||||
.ToDictionary(x => x.GuildId, x =>
|
||||
{
|
||||
var pr = new PollRunner(db, x);
|
||||
@@ -70,7 +70,7 @@ namespace NadekoBot.Modules.Games.Services
|
||||
{
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
uow.Polls.Add(p);
|
||||
uow._context.Poll.Add(p);
|
||||
uow.SaveChanges();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace NadekoBot.Modules.Games.Services
|
||||
pr.OnVoted -= Pr_OnVoted;
|
||||
|
||||
using var uow = _db.GetDbContext();
|
||||
uow.Polls.RemovePoll(pr.Poll.Id);
|
||||
uow._context.RemovePoll(pr.Poll.Id);
|
||||
uow.SaveChanges();
|
||||
|
||||
return pr.Poll;
|
||||
|
Reference in New Issue
Block a user