// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseSession(); app.UseStatusCodePages(); 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(); } using (var scope = app.ApplicationServices.CreateScope()) { appDBcontent content = scope.ServiceProvider.GetRequiredService <appDBcontent>(); DbObjects.Initial(content); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSession(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); endpoints.MapRazorPages(); endpoints.MapHub <ChatHub>("/chat"); }); }
public CarRepository(appDBcontent appDBContent) { this.appDbContent = appDBContent; }
public HomeController(appDBcontent context, UserManager <UserModel> userManager, IAllMilks milkRep) { _milkRep = milkRep; db = context; _userManager = userManager; }
public Ordersrepository(appDBcontent appDBcontent, ShopCart shopCart) { this.appDBcontent = appDBcontent; this.shopCart = shopCart; }
public MilkController(IAllMilks iallMilks, IMilkCategory imilkCategory, appDBcontent context) { db = context; _allMilks = iallMilks; _allCategories = imilkCategory; }
public ShopCart(appDBcontent appDBContent) { this.appDbContent = appDBContent; }