endpoints.MapControllerRoute(
name: "blog-list",
pattern: "{controller}/{category?}",
defaults: new { Controller = "Blog", Action = "List" }
);
endpoints.MapControllerRoute(
name: "blog-info",
pattern: "{controller}/{action}/{id?}"
);
比如说我想配置 /blog/58.html
其中58是id
相关问题
- How do I install System.Drawing.Common in a projec
- Has anyone gotten swashbuckle to work with .net co
- Does .NET Core work with the NUnit console runner?
- Exception “error MSB3024: Could not copy the file…
- How to change core pattern only for a particular a
假如 Action 名称是 Info ,可以使用下面的路由配置