I have the following code in my Startup.cs
endpoints.MapControllerRoute(
name: "Default",
pattern: "{controller}/{action}/{id?}"
);
Routing doesn't work for the following method in the controller and returns 404
public async Task<ActionResult> Index(int id)
{
}
The url I'm trying to navigate is
/home/our-villages/property/100
However, it's working fine without the parameter value '100'. It hits the controller action in this case.
/home/our-villages/property
I believe I'm missing something in reagards to setting up the routing with parameters here. Any idea?