Closed mdewey closed 6 years ago
I need serious help understanding these endpoints. I have confused myself immensely. Not understanding "Grellephant" and why it displays when doing a post although it is not in the context anymore(was before, I deleted it now).
Fearing I will do more damage than good by going back and trying to fix my errors
I have essentially all of the work done for both this assignment and the following, just need the endpoints, and for search to work.
https://github.com/andrewjlanza/safari
THANK YOU SO MUCH MARK!
Your homework was marked: Meets Expectations
“Gavin Approved!” — via Jason L Perry
title: Take the Safari Online. draft: true
Let's Continue our safari adventure
We are taking a surprise trip to the Savannah for a safari to see all sorts of exotic animals. During our time their we want to keep track of all the animals we have seen. For this, we need to create an API to help record what we see.
Objectives
Requirements
Explorer Mode
[ ] Your database will be named called
SafariVacation
/safari_vacation
SeenAnimals
/seen_animals
that has the following columnsId
/id
(int)Species
/species
(string)CountOfTimesSeen
/count_of_times_seen
(int)LocationOfLastSeen
/location_of_last_seen
(string)pgcli
.[x] Your API should have the following endpoints:
GET /Animals
Endpoint that returns all animals you have seenGET /Search?species=lion
that returns all animals where the species name contains the title parameterPOST /Animal
endpoints that adds a animal to the database. THis should take a JSON bodyGET /Animal/{location}
that returns animals of only that locationPUT /Animal/{animal}
endpoint that adds 1 to that animalDELETE /Animal/{animal}
endpoint that deletes that animal from the databaseAdventure Mode
Location
be its own tableSearch
endpoint to search by animal or by locationPUT /Animal/{animal}/{amount}
endpoint that adds{amount}
to that animalEpic Mode
Additional Resources
.NET
Here are the interesting commands you will need for tonights assignment
To get the code gen tools
To add Entity Framework to your project:
To create your database:
To create the DbContext
dotnet ef migrations add AddBaordGameTable
dotnet ef database update