This course will be retired on July 14, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Adding a One-to-Many Entity Relationship 5:48
- Using a One-to-Many Relationship 8:35
- Defining a Foreign Key Property 2:59
- Defining and Using a One-to-Many Relationship 2 objectives
- Adding a Many-to-Many Relationship 10:33
- Defining a Many-to-Many Relationship 2 objectives
- Defining a Many-to-Many Relationship with an Explicit Bridge Entity 10:25
- Defining a Many-to-Many Relationship with an Explicit Bridge Entity 3 objectives
- Using Data Annotations to Refine the Generated Database 5:58
- Refining a Model Using Data Annotations 1 objective
- Overriding the Context's OnModelCreating Method 6:33
- Using the Fluent API 1 objective
- Populating Your Database with Seed Data 5:55
- Section Review 10 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let's take a look at how we can refine our model by using data annotation attributes on our entity class properties.
Follow Along
To follow along commiting your changes to this course, you'll need to fork the dotnet-comic-book-gallery-model repo. Then you can clone, commit, and push your changes to your fork like this:
git clone <your-fork>
cd dotnet-comic-book-gallery-model
git checkout tags/v3.6 -b using-data-annotations-to-refine-the-generated-database
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Ar33ss Leon
4,621 Points2 Answers
-
PLUS
kevin hudson
Courses Plus Student 11,987 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up