chore(codebase): full cleanup pass
This commit is contained in:
@@ -13,7 +13,7 @@ public static class DependencyInjection
|
||||
{
|
||||
builder.Services.AddDbContext<TippingDbContext>(configureAction);
|
||||
builder.Services.AddTransient<ITipPaymentNotifier, TipPaymentNotifier>();
|
||||
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user