We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebe80b1 commit 9fbb556Copy full SHA for 9fbb556
MyAspNetCoreApp.Web/Controllers/BlogController.cs
@@ -4,7 +4,7 @@ namespace MyAspNetCoreApp.Web.Controllers
4
{
5
public class BlogController : Controller
6
7
- public IActionResult Article()
+ public IActionResult Article(string name, int id)
8
9
return View();
10
}
MyAspNetCoreApp.Web/Program.cs
@@ -46,8 +46,7 @@
46
47
app.MapControllerRoute(
48
name: "article",
49
- pattern: "blog/{*article}",
50
- defaults: new { controller="Blog", action="Article" });
+ pattern: "{controller=Blog}/{action=Article}/{name}/{id}");
51
52
53
name: "productpages",
0 commit comments