public static IServiceCollection AddRespositoryDependencies( this IServiceCollection services, IConfiguration configuration) { services.AddSingleton <IMasGlobalEmployeeTestRepository, MasGlobalEmployeeTestRepository>(); var MasGlobalEmployeeTestConfig = new MasGlobalEmployeeTestConfig { Url = configuration.GetValue <string>("ApiMasGlobal:Url") }; services.AddSingleton(masGlobalEmployeeTestConfig => MasGlobalEmployeeTestConfig); return(services); }
public MasGlobalEmployeeTestRepository(MasGlobalEmployeeTestConfig masGlobalEmployeeTestConfig, IHttpClientFactory httpClientFactory) { _MasGlobalEmployeeTestConfig = masGlobalEmployeeTestConfig; _HttpClientFactory = httpClientFactory; }