// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, DemoCoreContext context, ApplicationDbContext identityContext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Error"); //app.UseHsts(); } //app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseNodeModules(env); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); new DemoCoreDbInitializer(context).Seed().Wait(); new IdentityDbInitializer(identityContext, userManager, roleManager).Seed(); }
public Repository(DemoCoreContext context) { Db = context; DbSet = Db.Set <TEntity>(); }
public KnowledgeDeveloperRepository(DemoCoreContext context) : base(context) { }
public OccupationRepository(DemoCoreContext context) : base(context) { }
public PeopleRepository(DemoCoreContext context) : base(context) { this.context = context; }
public OccupationBestWorkTimeRepository(DemoCoreContext context) : base(context) { }
public DesignerRepository(DemoCoreContext context) : base(context) { }
public WorkAvailabilityRepository(DemoCoreContext context) : base(context) { }
public BestWorkTimeRepository(DemoCoreContext 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, IHttpContextAccessor accessor, DemoCoreContext context, ApplicationDbContext identityContext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // 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.UseCors(c => { c.AllowAnyHeader(); c.AllowAnyMethod(); c.AllowAnyOrigin(); }); //app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(); app.UseSwagger(); app.UseSwaggerUI(s => { s.SwaggerEndpoint("/swagger/v1/swagger.json", "DemoCore Project API v1.0"); }); new DemoCoreDbInitializer(context).Seed().Wait(); new IdentityDbInitializer(identityContext, userManager, roleManager).Seed(); }
public UnitOfWork(DemoCoreContext context) { _context = context; }
public DeveloperRepository(DemoCoreContext context) : base(context) { }
public KnowledgeRepository(DemoCoreContext context) : base(context) { }
public DemoCoreDbInitializer(DemoCoreContext context) { this.context = context; }