// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AppDBcontext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } 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(); db.Database.EnsureCreated(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); }); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AppDBcontext db, IServiceProvider service) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } 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(); } db.Database.EnsureCreated(); SeedData.Initialize(app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope().ServiceProvider); SeedData.CreateUserRoles(service).Wait(); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); }); }
public AccountController(UserManager <AppUser> userManager, SignInManager <AppUser> signInManager, RoleManager <IdentityRole> role, AppDBcontext context) { _userManager = userManager; _signInManager = signInManager; _role = role; _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); app.UseStaticFiles(); app.UseAuthentication(); //login things app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Account}/{action=Login}/{id?}"); }); AppDBcontext.CreateAdminAccount(app.ApplicationServices, _configuration).Wait(); //admin role things //AppDBcontext.seedData(app.ApplicationServices); }
public AddTable(AppDBcontext dbContext, ICheckInput check) { _Check = check; this.Context = dbContext; }
public ShowRepository(AppDBcontext dBcontext) { Context = dBcontext; }
public AddValueToDB(AppDBcontext dbContext, ICheckValue check) { Context = dbContext; _check = check; }
//private GenericRepository<User> _userRepository; //private GenericRepository<Product> _productRepository; //private GenericRepository<Token> _tokenRepository; #endregion public UnitOfWork(AppDBcontext context) { _context = context; }
public RepositoryWrapper(AppDBcontext appDBcontext) { AppDBcontext = appDBcontext; }
public AnswerController(AppDBcontext context) { _context = context; }
public CheckValueInput(AppDBcontext dbContext) { Context = dbContext; }
public SQLProductRepo(AppDBcontext db, IHostingEnvironment hostingEnvironment) { this.db = db; this.hostingEnvironment = hostingEnvironment; }
public SQLOrderRepo(AppDBcontext db) { this.db = db; }
public QuestionController(AppDBcontext context) { _context = context; }