路由
2019-04-04 17:40 更新
WTM框架本身为你配置了标准的路由,如果需要自定义,可以修改Program.cs文件配置自己的路由
定义数据路由- public class Program
- {
- public static void Main(string[] args)
- {
- BuildWebHost(args).Run();
- }
- public static IWebHost BuildWebHost(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .ConfigureServices(x =>
- {
- x.AddFrameworkService(dataPrivilegeSettings: pris);
- x.AddLayui();
- })
- .Configure(x =>
- {
- x.UseFrameworkService(routes =>
- {
- routes.MapRoute(
- name: "areaRoute",
- template: "{area:exists}/{controller=Home}/{action=Index}/{id?}");
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
- });
- })
- .Build();
- }
-
以上内容是否对您有帮助:
← 数据权限
更多建议: