excise entity framework from all remaining code

This commit is contained in:
sam 2024-10-28 14:04:55 +01:00
parent d6c3133d52
commit ff92c5f335
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
62 changed files with 402 additions and 1339 deletions

View file

@ -16,10 +16,8 @@
using System.Diagnostics;
using Catalogger.Backend.Cache.InMemoryCache;
using Catalogger.Backend.Database;
using Catalogger.Backend.Database.Dapper;
using Dapper;
using Humanizer;
using Microsoft.EntityFrameworkCore;
using Prometheus;
namespace Catalogger.Backend.Services;
@ -40,7 +38,6 @@ public class MetricsCollectionService(
var timer = CataloggerMetrics.MetricsCollectionTime.NewTimer();
await using var scope = services.CreateAsyncScope();
await using var db = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
await using var conn = scope.ServiceProvider.GetRequiredService<DatabaseConnection>();
var messageCount = await conn.ExecuteScalarAsync<int>("select count(id) from messages");