week 08 - day 01 - Safari DB - Using ORMs
Closed this issue · 1 comments
ads6495 commented
ORM Safari!
We are taking a surprise trip to the Savannah for a safari to see all sorts of exotic animals. During our time there we want to keep track of all the animals we have seen. For this, we need to create a database, as well as a small console application to help record what we see.
Objectives
- Use an ORM to query against a database
Requirements
Additional Reading
NOTE: The Additional Resources section below is very helpful. Consider reading this after reading Explorer mode. Then make a plan for the assignment for digging in and writing code.
Explorer Mode
- Create a database called
SafariVacation
- This will have 1 table called
SeenAnimals
that has the following columnsId
(int)Species
(string)CountOfTimesSeen
(int)LocationOfLastSeen
(string)
- NOTE: This should be made all in the code (C#), and not created in the
pgcli
.
- This will have 1 table called
- Create a small console application, and create the following queries using your languages ORM.
- Display all animals the user has seen
- Update the
CountOfTimesSeen
andLocationOfLastSeen
for an animal - Display all animals seen in the
Jungle
- Remove all animals that I have seen in the
Desert
. - Add all the
CountOfTimesSeen
and get a total number of animals seen - Get the
CountOfTimesSeen
oflions
,tigers
andbears
Adventure Mode
- Add a new column called
LastSeenTime
, with a type of DateTime. This will require you to add and run a new migration.
Epic Mode
- Continue to make progress on your capstone project. This should be tasks like Database Schema, HTML, CSS
Additional Resources
.NET
- EF Core
- Documentation: Dotnet EF CLI Docs
- LINQ notes
- EF Core Notes