2020
10-08
10-08
.NETCore添加区域Area代码实例解析
一,如下图二,构建好框架,将不必要的包删掉三,添加路由app.UseEndpoints(endpoints=>{endpoints.MapControllerRoute(name:"default",pattern:"{controller=Home}/{action=Index}/{id?}");endpoints.MapAreaControllerRoute(name:"areas","areas",pattern:"{area:exists}/{controller=Home}/{action=Index}/{id?}");});四,添加控制器usingSy...
继续阅读 >