diff --git a/docs/errata/improvements.md b/docs/errata/improvements.md index e544d53..fa327e6 100644 --- a/docs/errata/improvements.md +++ b/docs/errata/improvements.md @@ -1049,13 +1049,13 @@ public async Task CategoryDetail(int? id) In this exercise, you are tasked to "extend the `Northwind.Mvc` website project to have pages where a visitor can fill in a form to create a new customer, or search for a customer and then delete them. The MVC controller should make calls to the Northwind web service to create and delete customers." -Without addtiional help and with no solution initially, it can be tricky for a new reader to complete this exercise. +Without additional help and with no solution provided by me, it can be tricky for a new reader to complete this exercise. I have now provided a possible solution and updated the GitHub repository with it. In the next edition, I will also provide some hints, similar to the following. The project already has a page to show customers, either all of them or only those in a specified country. To avoid work, we will use this existing functionality. We just need to add a button in the `Customers.cshtml` view to **Add Customer**, a **Delete** button in a new column for each customer in the table, and areas to output success and errors messages, as shown in the following code: -**At the top of the Customers page** +**At the top of the Customers.cshtml Razor view** ```html @if (TempData["error-message"] is not null) { @@ -1070,7 +1070,11 @@ The project already has a page to show customers, either all of them or only tho class="btn btn-outline-primary">Add Customer ``` -**In the table of customers** +**In the table of customers, a blank header and a new column for delete buttons** +```html + +``` + ```html AddCustomer(Customer customer) return RedirectToAction("Customers"); } -// GET /Home/DeleteCustomer +// GET /Home/DeleteCustomer/{customerId} public async Task DeleteCustomer(string customerId) { HttpClient client = clientFactory.CreateClient(