chore(codebase): full cleanup pass

This commit is contained in:
2025-06-21 01:58:48 -04:00
parent 8323477cd0
commit 81b5db34ef
92 changed files with 529 additions and 452 deletions

View File

@@ -9,7 +9,7 @@ public static class DependencyInjection
Action<DbContextOptionsBuilder>? configureAction = null)
{
builder.Services.AddDbContext<MessagingDbContext>(configureAction);
return builder;
}
@@ -17,10 +17,10 @@ public static class DependencyInjection
this IApplicationBuilder app,
CancellationToken cancellationToken = default)
{
var scopeFactory = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>();
using var scope = scopeFactory.CreateScope();
await using var context = scope.ServiceProvider.GetRequiredService<MessagingDbContext>();
await context.Database.MigrateAsync(cancellationToken: cancellationToken);
IServiceScopeFactory scopeFactory = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>();
using IServiceScope scope = scopeFactory.CreateScope();
await using MessagingDbContext context = scope.ServiceProvider.GetRequiredService<MessagingDbContext>();
await context.Database.MigrateAsync(cancellationToken);
return app;
}