Removed poll repository

This commit is contained in:
Kwoth
2021-06-18 08:34:03 +02:00
parent dbf51a8a1b
commit ae59bac118
7 changed files with 17 additions and 32 deletions

View File

@@ -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;