// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManager, OnovaContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler(e => { e.Run(async context => { context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; var error = context.Features.Get <IExceptionHandlerFeature>(); if (error != null) { context.Response.AddApplicationError(error.Error.Message); await context.Response.WriteAsync(error.Error.Message); } }); }); } app.UseCors(x => x.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin().AllowCredentials()); app.UseAuthentication(); //Run only in first-run Seed.SeedData(userManager, roleManager, dbContext).Wait(); app.UseMvc(); }
public AuthRepository(OnovaContext context, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender) { _context = context; _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; }
public CustomerCartController(OnovaContext context) { _context = context; }
public AnonymousCustomerCartController(OnovaContext context) { _context = context; }
public OrderController(OnovaContext context, IEmailSender emailSender) { _context = context; _emailSender = emailSender; }
public BrandController(OnovaContext context) { _context = context; }
public GeneralImageController(OnovaContext context) { _context = context; }
public PromotionController(OnovaContext context) { _context = context; }
public ProductController(OnovaContext context, IEmailSender emailSender) { _context = context; _emailSender = emailSender; }
public ShippingInfoController(OnovaContext context) { _context = context; }
public CustomerController(OnovaContext context, IAuthRepository auth) { _context = context; _auth = auth; }
public CategoryController(OnovaContext context) { _context = context; }
public AdminController(OnovaContext context, RoleManager <ApplicationRole> roleManager) { _context = context; _roleManager = roleManager; }
public ProductStatusController(OnovaContext context) { _context = context; }