// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, Projeto_Lab_WebContext bd, UserManager <IdentityUser> gestorUtilizadores, RoleManager <IdentityRole> gestorRoles) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseNotyf(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); endpoints.MapRazorPages(); }); SeedData.InsereRolesAsync(gestorRoles).Wait(); if (env.IsDevelopment()) { SeedData.PreencheDados(bd); SeedDataContratos.InsereDadosContratos(bd); SeedData.InsereUtilizadoresFicticiosAsync(gestorUtilizadores).Wait(); CalculoDaFaturacaoMensal.CalculoFaturacaoOperadoresTeste(bd); CalculoDaFaturacaoMensal.CalculoFaturacaoOperadoresMensal(bd); } }
public PacotesController(Projeto_Lab_WebContext context) { bd = context; }
public ReclamacoesController(Projeto_Lab_WebContext context) { bd = context; }
public ServicosController(Projeto_Lab_WebContext context) { bd = context; }
public UtilizadoresController(Projeto_Lab_WebContext context, UserManager <IdentityUser> gestorUtilizadores) { _context = context; _gestorUtilizadores = gestorUtilizadores; }
public AdminOpController(IEmailSender emailSender, IWebHostEnvironment env, Projeto_Lab_WebContext context) { bd = context; _emailSender = emailSender; }
public Top10Controller(Projeto_Lab_WebContext context) { bd = context; }
public PromocoesController(Projeto_Lab_WebContext context) { bd = context; }
public ContratosController(Projeto_Lab_WebContext context) { bd = context; }