Completato fix SPEC, ok x MON, altri da verificare/sistemare
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using MP.AppAuth.Controllers;
|
||||
using MP.AppAuth.Services;
|
||||
using MP.Data.Controllers;
|
||||
using MP.Data.Repository.Anag;
|
||||
@@ -49,6 +50,33 @@ namespace MP.Data
|
||||
return services;
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunta repository/servizi specifici per LAND
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddLandDataLayer(this IServiceCollection services)
|
||||
{
|
||||
|
||||
services.TryAddSingleton<IMpLandRepository, MpLandRepository>();
|
||||
services.TryAddSingleton<SyncService>();
|
||||
services.TryAddSingleton<TabDataService>();
|
||||
services.TryAddSingleton<LandDataService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunta repository/servizi specifici per MON
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddMonDataLayer(this IServiceCollection services)
|
||||
{
|
||||
|
||||
services.TryAddSingleton<IMpMonRepository, MpMonRepository>();
|
||||
services.TryAddSingleton<MonDataFeeder>();
|
||||
return services;
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunta repository/servizi specifici per SPEC
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
@@ -56,10 +84,8 @@ namespace MP.Data
|
||||
public static IServiceCollection AddSpecDataLayer(this IServiceCollection services)
|
||||
{
|
||||
// ---------- Start Repository ----------
|
||||
// Singleton
|
||||
services.TryAddSingleton<IAnagRepository, AnagRepository>();
|
||||
services.TryAddScoped<IAnagRepository, AnagRepository>();
|
||||
|
||||
// Scoped
|
||||
services.TryAddScoped<IProductionRepository, ProductionRepository>();
|
||||
services.TryAddScoped<IDossierRepository, DossierRepository>();
|
||||
services.TryAddScoped<IFluxLogRepository, FluxLogRepository>();
|
||||
@@ -67,35 +93,26 @@ namespace MP.Data
|
||||
services.TryAddScoped<IMpMonRepository, MpMonRepository>();
|
||||
services.TryAddScoped<IMpVocRepository, MpVocRepository>();
|
||||
services.TryAddScoped<IMpLandRepository, MpLandRepository>();
|
||||
|
||||
|
||||
// ---------- End Repository ----------
|
||||
|
||||
|
||||
// ---------- Start Servizi ----------
|
||||
|
||||
// Singleton
|
||||
|
||||
//services.TryAddSingleton<MpDataService>();
|
||||
|
||||
// Scoped
|
||||
|
||||
// ---------- End Servizi ----------
|
||||
|
||||
|
||||
// ---------- Start Altro ----------
|
||||
// Singleton
|
||||
services.TryAddSingleton<AppAuthService>();
|
||||
services.TryAddScoped<AppAuthController>();
|
||||
services.TryAddScoped<MPController>();
|
||||
services.TryAddScoped<AppUserController>();
|
||||
services.TryAddScoped<AppAuthService>();
|
||||
services.TryAddScoped<OrderDataSrv>();
|
||||
services.TryAddScoped<ListSelectDataSrv>();
|
||||
services.TryAddSingleton<SharedMemService>();
|
||||
services.TryAddSingleton<TabDataService>();
|
||||
services.TryAddSingleton<TabDataFeeder>();
|
||||
|
||||
// Scoped
|
||||
services.TryAddScoped<TabDataFeeder>();
|
||||
services.AddScoped<ISessionStorageService, SessionStorageService>();
|
||||
services.AddScoped<ILocalStorageService, LocalStorageService>();
|
||||
|
||||
// ---------- End Altro ----------
|
||||
|
||||
return services;
|
||||
|
||||
Reference in New Issue
Block a user