// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, LvMiniDbContext lvMiniDbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler(appBuilder => { appBuilder.Run(async context => { context.Response.StatusCode = 500; await context.Response.WriteAsync("An unexpected fault happened. Please try again later."); }); }); } app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "LvMiniAPI 1.0"); }); app.UseAuthentication(); app.UseMvc(); }
public TeamRepository(LvMiniDbContext context) : base(context) { }
public ProductGroupRepository(LvMiniDbContext context) : base(context) { }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ConfigurationDbContext configurationDbContext, PersistedGrantDbContext persistedGrantDbContext, LvMiniDbContext lvMiniDbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Home/Error"); } configurationDbContext.Database.Migrate(); configurationDbContext.SeedDataForContext(); persistedGrantDbContext.Database.Migrate(); lvMiniDbContext.SeedUsersForContext(); FileExtensionContentTypeProvider typeProvider = new FileExtensionContentTypeProvider(); if (!typeProvider.Mappings.ContainsKey(".woff2")) { typeProvider.Mappings.Add(".woff2", "application/font-woff2"); } app.UseIdentityServer(); app.UseStaticFiles(); app.UseMvcWithDefaultRoute(); }
public LogRepository(LvMiniDbContext context) : base(context) { }
protected BaseRepository(LvMiniDbContext context) { Context = context; Entities = Context.Set <T>(); }
public UserRepository(LvMiniDbContext context) : base(context) { }