We are taking a surprise trip to the Savannah for a safari to see all sorts of exotic animals. During our time on safari, 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 - Part 1
[ ] Create a database called SafariVacation
[ ] This will have 1 table called SeenAnimals that has the following columns
Id (int)
Species (string)
CountOfTimesSeen (int)
LocationOfLastSeen (string)
NOTE: This should be made all in the code (C#), and not created in the pgcli.
[ ] Create a small console application, and create the following queries using your languages ORM.
[ ] Display all animals the user has seen
[ ] Update the CountOfTimesSeen and LocationOfLastSeen 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 of lions, tigers and bears
Explorer Mode - part 2
[ ] Work on the Koans.
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.
Additional Resources
.NET
Here are the interesting commands you will need for tonight's assignment
ORM Safari!
We are taking a surprise trip to the Savannah for a safari to see all sorts of exotic animals. During our time on safari, 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
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 - Part 1
SafariVacation
SeenAnimals
that has the following columnsId
(int)Species
(string)CountOfTimesSeen
(int)LocationOfLastSeen
(string)pgcli
.CountOfTimesSeen
andLocationOfLastSeen
for an animalJungle
Desert
.CountOfTimesSeen
and get a total number of animals seenCountOfTimesSeen
oflions
,tigers
andbears
Explorer Mode - part 2
Adventure Mode
LastSeenTime
, with a type of DateTime. This will require you to add and run a new migration.Epic Mode
Additional Resources
.NET
Here are the interesting commands you will need for tonight's assignment