Exemplo n.º 1
0
 public ProductController(KingPimDatabaseContext contex, UserManager <IdentityUser> UserManager, IDataRepository repository)
 {
     _userManager = UserManager;
     repo         = repository;
 }
Exemplo n.º 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IIdentitySeeder identitySeeder, KingPimDatabaseContext ctx)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseStatusCodePages(); // felhantering implementation
            }
            else
            {
                app.UseExceptionHandler("/error.html");
                app.UseStatusCodePagesWithReExecute("/Error/Error", "?statusCode={0}");
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseAuthentication();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Account}/{action=Login}/{id?}");
            });

            identitySeeder.CreateAdminAccountIFEmpty();
        }
 public VerticalNavBlockCatViewComponent(KingPimDatabaseContext context)
 {
     ctx = context;
 }
Exemplo n.º 4
0
 public DataRepository(KingPimDatabaseContext context, UserManager <IdentityUser> UserManager)
 {
     ctx          = context;
     _userManager = UserManager;
 }