feat: exorcise entity framework core from most responders

This commit is contained in:
sam 2024-10-27 23:02:42 +01:00
parent 33b78a7ac5
commit 5891f28f7c
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
32 changed files with 743 additions and 145 deletions

View file

@ -14,8 +14,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
using Catalogger.Backend.Cache.InMemoryCache;
using Catalogger.Backend.Database;
using Catalogger.Backend.Database.Queries;
using Catalogger.Backend.Database.Dapper.Repositories;
using Catalogger.Backend.Extensions;
using Catalogger.Backend.Services;
using Remora.Discord.API.Abstractions.Gateway.Events;
@ -27,7 +26,7 @@ using Remora.Results;
namespace Catalogger.Backend.Bot.Responders.Channels;
public class ChannelCreateResponder(
DatabaseContext db,
GuildRepository guildRepository,
RoleCache roleCache,
ChannelCache channelCache,
UserCache userCache,
@ -96,7 +95,7 @@ public class ChannelCreateResponder(
}
}
var guildConfig = await db.GetGuildAsync(ch.GuildID.Value, false, ct);
var guildConfig = await guildRepository.GetAsync(ch.GuildID);
webhookExecutor.QueueLog(
guildConfig,
LogChannelType.ChannelCreate,