diff --git a/docs/errata/improvements.md b/docs/errata/improvements.md index 24df6aa..b238324 100644 --- a/docs/errata/improvements.md +++ b/docs/errata/improvements.md @@ -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 CategoryDetail(int? id) +```