mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 18:28:27 -04:00
UnitOfWork compltely removed. GetDbContext now returns a NadekoContext. Changed every access to contect via uow._context to uow
This commit is contained in:
@@ -65,7 +65,7 @@ namespace NadekoBot.Modules.Utility.Services
|
||||
{
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
uow._context.Set<Reminder>()
|
||||
uow.Set<Reminder>()
|
||||
.RemoveRange(reminders);
|
||||
|
||||
await uow.SaveChangesAsync();
|
||||
@@ -76,7 +76,7 @@ namespace NadekoBot.Modules.Utility.Services
|
||||
{
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
return uow._context.Reminders
|
||||
return uow.Reminders
|
||||
.FromSqlInterpolated($"select * from reminders where ((serverid >> 22) % {_creds.TotalShards}) == {_client.ShardId} and \"when\" < {now};")
|
||||
.ToListAsync();
|
||||
}
|
||||
|
Reference in New Issue
Block a user