public static void AddOnboardingSIGDB1Context(this IServiceCollection services, AppSettingsDoOnboardingSIGDB1 appSettingsDoOnboardingSIGDB1) { services.AddDbContext <OnboardingSIGDB1Context>(options => { options. UseSqlServer(appSettingsDoOnboardingSIGDB1.StringDeConexoes.OnboardingSIGDB1); }); }
public static void AddOnboardingSIGDB1(this IServiceCollection services, IConfiguration Configuration) { var appSettingsDoOnboardingSIGDB1 = new AppSettingsDoOnboardingSIGDB1(); Configuration.Bind("OnboardingSIGDB1", appSettingsDoOnboardingSIGDB1); services.AddSingleton(appSettingsDoOnboardingSIGDB1); services.AddOnboardingSIGDB1Context(appSettingsDoOnboardingSIGDB1); services.ResolverAsDependenciasDoOnboardingSIGDB1(); AutoMapperConfiguration.Initialize(); }