首页 > 代码库 > asp.net5 Area的处理

asp.net5 Area的处理

Controller加上Attribute

[Area("SystemSecurity")]

startup中配置

            app.UseMvc(routes =>            {                // Areas support                routes.MapRoute(                    name: "areaRoute",                    template: "{area:exists}/{controller=Home}/{action=Index}/{id?}");                routes.MapRoute(                    name: "default",                    template: "{controller=Home}/{action=Index}/{id?}");            });

 

asp.net5 Area的处理