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

@@ -3,6 +3,7 @@ using Discord;
using NadekoBot.Core.Services.Database.Models;
using NadekoBot.Core.Services;
using System;
using System.Linq;
using System.Threading;
namespace NadekoBot.Modules.Games.Common
@@ -57,7 +58,7 @@ namespace NadekoBot.Modules.Games.Common
finally { _locker.Release(); }
using (var uow = _db.GetDbContext())
{
var trackedPoll = uow.Polls.GetById(Poll.Id);
var trackedPoll = uow._context.Poll.FirstOrDefault(x => x.Id == Poll.Id);
trackedPoll.Votes.Add(voteObj);
uow.SaveChanges();
}