Exemple #1
0
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, UnionAdminContext db)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            db.Database.EnsureCreated();
            app.UseCookiePolicy();
            app.UseStaticFiles();
            app.UseSession();
            //app.UseStaticFiles();

            app.UseRouting();

            //app.UseAuthentication();

            //app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}");
            });
        }
 public AccountController(UnionAdminContext context)
 {
     _context = context;
 }
 public TeamsController(UnionAdminContext context)
 {
     _context = context;
 }