using Schaad.Accounting.Interfaces; using Schaad.Accounting.Repositories; using Schaad.Accounting.Services; using Schaad.Finance.Api; using Schaad.Finance.Services; namespace Schaad.Accounting.UI { public static class Extensions { public static IServiceCollection AddAccounting(this IServiceCollection services) { // Singleton because MyHeader triggers a full page reload (forceLoad: true) after // changing year/mandator; a Scoped instance would be recreated on the new circuit // and lose the selection. TODO: persist selection to a cookie/query string so this // can safely become Scoped (see IMPROVEMENT_PLAN.md). services.AddSingleton(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddSingleton(); services.AddSingleton(); return services; } } }