public RegisterModel( UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, UPMobileContext context) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, UPMobileContext context, UserManager <IdentityUser> gestorUtilizadores, RoleManager <IdentityRole> gestorRoles) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseMigrationsEndPoint(); } 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(); SeedData.InsereAdministradorPadraoAsync(gestorUtilizadores).Wait(); if (env.IsDevelopment()) { SeedData.PreencheDadosFicticios(context); SeedData.InsereUtilizadoresFicticiosAsync(gestorUtilizadores).Wait(); } }
public FaturasController(UPMobileContext context, IEmailSender emailSender) { _context = context; _emailSender = emailSender; }
public HomeController(ILogger <HomeController> logger, INotyfService notyf, UPMobileContext context) { _logger = logger; _notyf = notyf; _context = context; }
public PacotesComerciaisController(UPMobileContext context) { _context = context; }
public ReclamacoesController(UPMobileContext context) { _context = context; }
public EstadosController(UPMobileContext context) { _context = context; }
public UtilizadoresController(UPMobileContext context) { _context = context; }
public PromocoesController(UPMobileContext context) { _context = context; }
public ContratosConteudosController(UPMobileContext context) { _context = context; }
public DistritosController(UPMobileContext context) { _context = context; }
public RolesController(UPMobileContext context) { _context = context; }