public ModalidadesService(Aplicacao_KolpingContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, SeedingService seedingService, Aplicacao_KolpingContext context) { context.Database.EnsureCreated(); var ptBR = new CultureInfo("pt-BR"); var localizationOptions = new RequestLocalizationOptions { DefaultRequestCulture = new RequestCulture(ptBR), SupportedCultures = new List <CultureInfo> { ptBR }, SupportedUICultures = new List <CultureInfo> { ptBR } }; app.UseRequestLocalization(localizationOptions); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); seedingService.Seed(); } else { app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public ModalidadesController(Aplicacao_KolpingContext context) { _context = context; }
public AlunoService(Aplicacao_KolpingContext context, IMapper mapper) { _context = context; _mapper = mapper; }