mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38: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:
@@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
{
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
return n(uow._context.DiscordUser.GetUserCurrency(id));
|
||||
return n(uow.DiscordUser.GetUserCurrency(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
var trs = new List<CurrencyTransaction>();
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
trs = uow._context.CurrencyTransactions.GetPageFor(userId, page);
|
||||
trs = uow.CurrencyTransactions.GetPageFor(userId, page);
|
||||
}
|
||||
|
||||
var embed = new EmbedBuilder()
|
||||
@@ -522,7 +522,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
cleanRichest = uow._context.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 10_000);
|
||||
cleanRichest = uow.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 10_000);
|
||||
}
|
||||
|
||||
await Context.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||
@@ -536,7 +536,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
{
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
cleanRichest = uow._context.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 9, page).ToList();
|
||||
cleanRichest = uow.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 9, page).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
{
|
||||
using (var uow = _db.GetDbContext())
|
||||
{
|
||||
toSend = uow._context.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 9, curPage);
|
||||
toSend = uow.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 9, curPage);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user