Ejemplo n.º 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?}");
            });
        }
Ejemplo n.º 2
0
 public AccountController(UnionAdminContext context)
 {
     _context = context;
 }
Ejemplo n.º 3
0
 public TeamsController(UnionAdminContext context)
 {
     _context = context;
 }