|
|
|
@ -14,12 +14,14 @@ internal static class Register |
|
|
|
|
services.AddScoped<CollaborateursService>(); |
|
|
|
|
services.AddScoped<AgenceService>(); |
|
|
|
|
services.AddScoped<BusinessUnitService>(); |
|
|
|
|
services.AddScoped<FonctionService>(); |
|
|
|
|
|
|
|
|
|
if (contextOptions.LoadFake) |
|
|
|
|
{ |
|
|
|
|
services.AddSingleton<ICollaborateurRepository, FakeCollaborateurRepository>(); |
|
|
|
|
services.AddSingleton<IAgenceRepository, FakeAgenceRepository>(); |
|
|
|
|
services.AddSingleton<IBusinessUnitRepository, FakeBusinessUnitRepository>(); |
|
|
|
|
services.AddSingleton<IFonctionRepository, FakeFonctionRepository>(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -27,6 +29,7 @@ internal static class Register |
|
|
|
|
services.AddScoped<ICollaborateurRepository, CollaborateurSqlRepository>(); |
|
|
|
|
services.AddScoped<IAgenceRepository, AgenceSqlRepository>(); |
|
|
|
|
services.AddScoped<IBusinessUnitRepository, BusinessUnitSqlRepository>(); |
|
|
|
|
services.AddScoped<IFonctionRepository, FonctionSqlRepository>(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |