feat(usability): preserve reporting year and locate outside-period bookings (U04)
This commit is contained in:
@@ -11,8 +11,8 @@ public static class DependencyInjection
|
||||
public static IServiceCollection AddInfrastructure(this IServiceCollection services, string connectionString)
|
||||
{
|
||||
services.AddSingleton(new DatabaseLocation(connectionString));
|
||||
services.AddDbContext<FinanceDbContext>(options =>
|
||||
options.UseSqlite(connectionString));
|
||||
// The factory also registers FinanceDbContext as scoped. Registering
|
||||
// AddDbContext first would give its singleton factory scoped options.
|
||||
services.AddDbContextFactory<FinanceDbContext>(options =>
|
||||
options.UseSqlite(connectionString));
|
||||
|
||||
@@ -24,6 +24,7 @@ public static class DependencyInjection
|
||||
services.AddScoped<IFileSaveService, FileSaveService>();
|
||||
services.AddSingleton<IBackupService, BackupService>();
|
||||
services.AddSingleton<ISettingsService, SettingsService>();
|
||||
services.AddSingleton<ReportingPeriod>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user