public AppController(IMailService mailService, IWARepository repository, IMapper mapper, WAContext context, IHostingEnvironment app, UserManager <StoreUser> userManager) { _mailService = mailService; _repository = repository; _context = context; _mapper = mapper; _app = app; _userManager = userManager; }
public AccountController(ILogger <AccountController> logger, SignInManager <StoreUser> signInManager, UserManager <StoreUser> userManager, IConfiguration config, WAContext context, RoleManager <IdentityRole> roleManager) { _logger = logger; _signInManager = signInManager; _userManager = userManager; _config = config; _context = context; _roleManager = roleManager; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, WAContext waContext) { loggerFactory.AddConsole(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); loggerFactory.AddDebug(LogLevel.Information); } else { loggerFactory.AddDebug(LogLevel.Error); app.UseExceptionHandler("/Home/Error"); } var options = new RewriteOptions() .AddRedirectToHttps(); app.UseRewriter(options); if (env.IsDevelopment()) { app.UseCors("CorsPolicy"); } app.UseAuthentication(); app.UseMvc(config => { config.MapRoute( name: "Default", template: "{controller}/{action}/{id?}", defaults: new { controller = "Home", action = "Index" } ); }); waContext.Database.Migrate(); waContext.EnsureSeedDataForContext(); }
public WARepository(WAContext context, UserManager <WAUser> userManager) { this.context = context; this.userManager = userManager; }