Exemple #1
0
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CompleteGPSUtilityContext context)
        {
            context.Database.Migrate();

            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.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}");
                endpoints.MapControllerRoute(
                    name: "map",
                    pattern: "{controller=Map}/{action=Index}/{id?}");
                endpoints.MapRazorPages();
            });
        }
 public DeviceController(ILogger <HomeController> logger, IConfiguration configuration, CompleteGPSUtilityContext context, UserManager <AppUser> userManager)
 {
     Logger        = logger;
     Configuration = configuration;
     Context       = context;
     UserManager   = userManager;
 }
 public LocationController(ILogger <HomeController> logger, CompleteGPSUtilityContext context,
                           UserManager <AppUser> userManager, SignInManager <AppUser> signInManager)
 {
     Logger        = logger;
     Context       = context;
     UserManager   = userManager;
     SignInManager = signInManager;
 }
 public AccountController(UserManager <AppUser> userManager, SignInManager <AppUser> signInManager, RoleManager <AppRole> roleManager,
                          ILogger <AccountController> logger, CompleteGPSUtilityContext context, IConfiguration configuration)
 {
     UserManager   = userManager;
     SignInManager = signInManager;
     RoleManager   = roleManager;
     Logger        = logger;
     Context       = context;
     Configuration = configuration;
 }
Exemple #5
0
 public ProbeController(ILogger <ProbeController> logger, IConfiguration configuration, CompleteGPSUtilityContext context)
 {
     Logger        = logger;
     Configuration = configuration;
     Context       = context;
 }