More work on figuring out the DB stuff and converting EF code to linqtodb where it's easy

This commit is contained in:
Kwoth
2023-07-09 06:50:04 +00:00
parent be1d14d095
commit 842a8a2f71
17 changed files with 210 additions and 180 deletions

View File

@@ -42,7 +42,7 @@ public static class DiscordUserExtensions
});
public static Task EnsureUserCreatedAsync(
this NadekoBaseContext ctx,
this DbContext ctx,
ulong userId)
=> ctx.GetTable<DiscordUser>()
.InsertOrUpdateAsync(
@@ -66,7 +66,7 @@ public static class DiscordUserExtensions
//temp is only used in updatecurrencystate, so that i don't overwrite real usernames/discrims with Unknown
public static DiscordUser GetOrCreateUser(
this NadekoBaseContext ctx,
this DbContext ctx,
ulong userId,
string username,
string discrim,