This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Lesson 17 (ORM Part 2)
Sally Steuterman edited this page Jul 28, 2020
·
1 revision
- How to work with model classes that have one-to-many and many-to-one relationships.
- How these relationship types are represented in a SQL database.
- 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.
- Check with your course manager for any additional announcements.
-
Again, review the relationship between C# classes/objects and database tables/rows.
-
Address the inverse relationship of one-to-many and many-to-one related classes.
-
Touch upon the fact that these types of relationships between classes need not be bi-directional.
-
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.
- Studio time in today's class is reserved to work on Assignment 4.
- 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.
- The material presented for today's class gives students the ability to finish Parts 1-2: Setting Up the Database and Adding Employers.
- 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.