Beispiel #1
0
 public HomeController(ILogger <HomeController> logger, AferogluDbContext context, IHttpContextAccessor httpContextAccessor)
 {
     _logger              = logger;
     _context             = context;
     _httpContextAccessor = httpContextAccessor;
     MainHelper.TryToSetLang(_httpContextAccessor);
 }
Beispiel #2
0
 public AccountController(AferogluDbContext context,
                          UserManager <AppUser> userManager,
                          SignInManager <AppUser> signinManager,
                          RoleManager <IdentityRole> roleManager)
 {
     _context       = context;
     _userManager   = userManager;
     _signinManager = signinManager;
     _roleManager   = roleManager;
 }
Beispiel #3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IWebHostEnvironment env,
                              AferogluDbContext context,
                              UserManager <AppUser> userManager,
                              RoleManager <IdentityRole> roleManager)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
                // 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.UseHttpsRedirection();
            app.UseStaticFiles();

            app.UseRouting();

            app.UseAuthorization();
            app.UseAuthentication();

            app.UseAuthorization();
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "areas",
                    pattern: "{area:exists}/{controller=Dashboard}/{action=Index}/{id?}");

                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}");
            });

            DbInitializer.Seed(context, userManager, roleManager).Wait();
        }
 public AferogluHistoryController(AferogluDbContext context,
                                  IWebHostEnvironment env)
 {
     _context = context;
     _env     = env;
 }
Beispiel #5
0
 public AJAXController(AferogluDbContext context, IHttpContextAccessor httpContextAccessor)
 {
     _context             = context;
     _httpContextAccessor = httpContextAccessor;
 }
Beispiel #6
0
 public SocialViewComponent(AferogluDbContext context, IHttpContextAccessor httpContextAccessor)
 {
     _context             = context;
     _httpContextAccessor = httpContextAccessor;
     MainHelper.TryToSetLang(_httpContextAccessor);
 }
Beispiel #7
0
 public SliderController(AferogluDbContext context,
                         IWebHostEnvironment env)
 {
     _context = context;
     _env     = env;
 }
Beispiel #8
0
 public StaticDataController(AferogluDbContext context,
                             IWebHostEnvironment env)
 {
     _context = context;
     _env     = env;
 }
 public TestimonialsController(AferogluDbContext context,
                               IWebHostEnvironment env)
 {
     _context = context;
     _env     = env;
 }