// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, AuthIdentityDbContext authDbContext, DataDbContext dataDbContext) { if (_env.IsDevelopment()) { app.UseDeveloperExceptionPage(); authDbContext.Database.EnsureDeleted(); authDbContext.Database.EnsureCreated(); //basic db without identity server dataDbContext.Database.EnsureDeleted(); dataDbContext.Database.EnsureCreated(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public EntityDataAccessBase() { //TODO: IoC DataAccessContext _context = new DefaultDbContextProvider().Context(); }
public UserAdminController(AuthIdentityDbContext dbContext) { _dbContext = dbContext; }
public EntityDataAccessBase(AuthIdentityDbContext context) { //NOTE: To share data context, use this constructor _context = context; }