Update improvements.md

This commit is contained in:
Mark J Price 2023-02-15 11:36:12 +00:00
parent 4c70f73328
commit ec19d71c40

View file

@ -132,3 +132,9 @@ And create a view that matches the name `CategoryDetail.cshtml`, as shown in the
```
> Note: You could also use the simpler link format `https://localhost:5001/home/category/1` but then both the action method and the view filename must be just `Category` instead of `CategoryDetail`.
If you want to keep the original link format, then you would need to decorate the action method as shown in the following code:
```cs
[Route("category/{id}")]
public async Task<IActionResult> CategoryDetail(int? id)
```