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 Base Controller Class 6:56
- Using the Repository Pattern 6:40
- Reviewing the Completed Repository 6:16
- Breaking Apart Our Repository 9:22
- Reviewing the Comic Book Artists Repository 3:36
- Creating a Generic Base Repository Class 12:24
- Using Our Generic Base Repository Class 6:02
- Alternatives to Using Repositories 12:49
- Section Review 5 questions
Well done!
You have completed Entity Framework with ASP.NET MVC!

- 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 see how we can prevent duplicating the code—from controller to controller—that's used to manage the lifetime of the database context.
Follow Along
To follow along committing your changes to this course, you'll need to fork the dotnet-comic-book-library-manager repo. Then you can clone, commit, and push your changes to your fork like this:
git clone <your-fork>
cd dotnet-comic-book-library-manager
git checkout tags/v2.8 -b adding-a-base-controller-class
Keyboard Shortcuts
-
CTRL+H
- Quick Replace -
SHIFT+ALT+ENTER
- Toggle fullscreen mode
Additional Learning
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated 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