mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
Update improvements.md
This commit is contained in:
parent
4c70f73328
commit
ec19d71c40
|
|
@ -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)
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue