Unfinished tasks for Dog App
vincentoleary opened this issue · comments
Go into the Shared folder in the _Layout.cshtml file. Add links for "Walkers" and "Owners" in the navbar. If you finish, try changing the views and the styling to your liking.
Create a model for Dog and implement a DogRepository and DogController that gives users the following functionality:
View a list of all Dogs
Create a new Dog (for now, capture the OwnerId as simple input field)
Edit a Dog
Delete a Dog
Use view models to make a profile page https://github.com/NewForce-at-Mountwest/bangazon-inc/blob/master/book-2-mvc/chapters/VIEW_MODELS.md
Show only authorized dogs for each user after login https://github.com/NewForce-at-Mountwest/bangazon-inc/blob/master/book-2-mvc/chapters/USER_RELATED_DATA.md
In the DogController update the GET and POST methods for the Edit and Delete actions to make sure that a user can only edit or delete a dog that they own. Example: if a user goes to /dogs/edit/5 or /dogs/delete/5 and they don't own that dog, they should get a 404 NotFound result.
Update the Index method in the walkers controller so that owners only see walkers in their own neighborhood. Hint: Use the OwnerRepository to look up the owner by Id before getting the walkers.
If a user goes to /walkers and is not logged in, they should see the entire list of walkers.