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

Lesson 17 (ORM Part 2)

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

Lesson 17: Relationships in Object-Relational Mapping

In the prep work this week, the students learned

  1. How to work with model classes that have one-to-many and many-to-one relationships.
  2. How these relationship types are represented in a SQL database.

Announcements

  1. Assignment #4 is open and students should be actively working on it. After today's class, students will be able to complete all but Part 3.
  2. Check with your course manager for any additional announcements.

Large Group Time (Instructor)

Lesson 17 Topics That Require Careful Attention

  1. Again, review the relationship between C# classes/objects and database tables/rows.

  2. Address the inverse relationship of one-to-many and many-to-one related classes.

  3. Touch upon the fact that these types of relationships between classes need not be bi-directional.

  4. Discuss the DbContext class and how to use and research its methods.

    a. The in-book CodingEvents example makes use of .Where(), .Include(), and lambda expressions. It would also be wise to review these.

Small Group Time: Lesson 17 Studio (TA Notes)

  1. Studio time in today's class is reserved to work on Assignment 4.
  2. Please take the time to complete the assignment yourself before class, or at least get familiar with the tasks at hand. Offer your experience solving the various parts or setting up the database so that you may share any stumbling blocks you may have encountered.
  3. The material presented for today's class gives students the ability to finish Parts 1-2: Setting Up the Database and Adding Employers.
  4. Some students may have difficulty creating a new techjobs schema and correctly linking to this in their ASP.NET app. Or they may struggle with creating a new MySQL user and assigning the right permissions. Be on the lookout for these issues as these will impede progress with the rest of the assignment.