feat: watchlist repository, remove ef core from all bot code
This commit is contained in:
parent
da4dfae27c
commit
f0511a560c
19 changed files with 155 additions and 97 deletions
|
|
@ -53,14 +53,4 @@ public static class QueryExtensions
|
|||
throw new CataloggerError("Guild not found, was not initialized during guild create");
|
||||
return guild;
|
||||
}
|
||||
|
||||
public static async Task<Watchlist?> GetWatchlistEntryAsync(
|
||||
this DatabaseContext db,
|
||||
Snowflake guildId,
|
||||
Snowflake userId,
|
||||
CancellationToken ct = default
|
||||
) =>
|
||||
await db
|
||||
.Watchlists.AsNoTracking()
|
||||
.FirstOrDefaultAsync(w => w.GuildId == guildId.Value && w.UserId == userId.Value, ct);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue