// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AdCampaignContext dbContext) { dbContext.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); }); }
public ApplicationRepository(AdCampaignContext context) => _context = context;
public UserService(AdCampaignContext context, IPasswordHasherService passwordHasherService) { _context = context; _passwordHasherService = passwordHasherService; }
public AuthenticationService(AdCampaignContext db, IPasswordHasher <User> passwordHasher) { _db = db; _passwordHasher = passwordHasher; }
public AdvertRepository(AdCampaignContext context) => _context = context;
public AdvertStatisticRepository(AdCampaignContext context) { _context = context; }
public FileRepository(AdCampaignContext db) => _db = db;