Ejemplo n.º 1
0
        // 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();
        }
Ejemplo n.º 2
0
 public Repository(DemoCoreContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }
 public KnowledgeDeveloperRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 4
0
 public OccupationRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 5
0
 public PeopleRepository(DemoCoreContext context) : base(context)
 {
     this.context = context;
 }
 public OccupationBestWorkTimeRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 7
0
 public DesignerRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 8
0
 public WorkAvailabilityRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 9
0
 public BestWorkTimeRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 10
0
        // 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();
        }
Ejemplo n.º 11
0
 public UnitOfWork(DemoCoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 12
0
 public DeveloperRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 13
0
 public KnowledgeRepository(DemoCoreContext context) : base(context)
 {
 }
Ejemplo n.º 14
0
 public DemoCoreDbInitializer(DemoCoreContext context)
 {
     this.context = context;
 }