My task is to write a program that stores a list of products in a relational database table. All products should have a unique Id, Name, Description, Quantity, and Price.
- The start / home page of the application should display the names of the three cheapest products in an HTML table. Add a top menu item for this page, labelled “Home”.
- Add a page that allows the user to see a listing of all products ordered by Name, which includes their Name and Price. If there are no products, the user should see a message “There are no products in the database”. Add a top menu item for this page, labelled “Products”.
- Clicking on a product’s name (from any of the pages described in 1 and 2 above) should lead the user to the product details page, that shows all the product’s information.
- Implement the ability to add a new product to the database. After adding a product, the user should be redirected to the product list (2). Add a top menu item for this page, labelled “Add Product”.
- Implement the ability to delete a product from the database. After deleting a product, the user should be redirected to the product list (2). Product deletion should be triggered by an action link alongside each product shown on the product list (2).
I did everything and I am done with the views, but I experience issues with my views, they are placed in a folder in Views called Product, but it gives me this error message:An unhandled exception occurred while processing the request.InvalidOperationException: The view 'Details' was not found. The following locations were searched:/Views/Home/Details.cshtml/Views/Shared/Details.cshtmlMicrosoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable originalLocations).I checked the locations and the routing and it seems correct, I do not know how to proceed.I also cannot use the "Edit", "Details", "Delete" and "Back to list" buttons that I made, but I can add products into the database.