Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Lesson 16 (ORM Part 1)

Sally Steuterman edited this page Jul 28, 2020 · 1 revision

Lesson 16: Introduction to Object-Relational Mapping

In the prep work this week, the students learned

  1. What object-relational mapping is.
  2. How to connect an ASP.NET Core MVC application to a MySQL database.
  3. How to create a new migration and update the database.
  4. How to create a DbContext.

Announcements

  1. Assignment #4 is open and students can start working on it!
  2. Check with your course manager for any additional announcements.

Large Group Time (Instructor)

Lesson 16 Topics That Require Careful Attention

  1. Review the relationship between C# classes/objects and database tables/rows.
  2. The students went through a number of different steps to get their ASP.NET apps going and storing events. Review each setup step and why it matters.
    1. Creating a new schema and add a new user in MySQL Workbench.
    2. Add the necessary dependencies in ASP.NET.
    3. Add the user info for the schema in MySQL into appsettings.json.
  3. Review what a model class is and what it becomes in a relational database.
  4. Review what a migration is and what it means for a relational database.
  5. Review the studio!

Small Group Time: Lesson 16 Studio (TA Notes)

  1. If students didn't finish the exercises, they need to start with the exercises first. If they did not finish following along with the videos, they need to check out the appropriate branch in their CodingEventsDemo repository to see what they have left. If they do not have this branch, they need to fetch it from the upstream.
    1. To do so, they need to make sure the upstream is set up with git remote -v and double check that they are on master.
    2. With the upstream present, run git fetch upstream
    3. Then merge the upstream into the forked repo with git merge upstream/master.
  2. Check in with your students!