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?}");
            });

 

posted @ 2016-09-06 14:53  KID  阅读(210)  评论(0编辑  收藏  举报