feat(usability): preserve reporting year and locate outside-period bookings (U04)

This commit is contained in:
2026-11-02 06:28:36 +01:00
parent 122d4de809
commit 9c41856b5b
16 changed files with 169 additions and 26 deletions
@@ -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;
}