Encapsulating EF Core 6 Usage
The usage of EF Core 6 is a vast and complicated topic. This course will teach you how to do this in a way that maintains proper encapsulation and abstraction.
What you'll learn
EF Core is a mature and complex ORM, and it’s often unclear how exactly you should use it. In this course, Encapsulating EF Core 6 Usage, you’ll learn to encapsulate the EF Core 6 logic in your application. First, you’ll explore how to isolate the usage of DbContext. Next, you’ll discover when you should and shouldn’t use repositories. Finally, you’ll learn how to choose between IQueryable and IEnumerable in your repositories. When you’re finished with this course, you’ll have the skills and knowledge of EF Core 6 needed to encapsulate and abstract away its usage.
Table of contents
- Introduction 0m
- Understanding the Repository Debate 3m
- When to Introduce a Repository? 3m
- Take 1: Retrieving a Collection of Related Entities 6m
- Take 2: Using Auto-including 5m
- Take 3: Retrieving Multiple Related Collections 9m
- Repository Examples Recap 4m
- Persisting Domain Objects 4m
- Generic vs. Non-generic Repositories 5m
- Should You Use a Generic Repository? 4m
- Summary 3m
- Introduction 0m
- Partially-initialized Entities Anti-pattern 5m
- Performance Implications of Loading Entities in Full 8m
- Tackling Performance Implications in Reads 8m
- Recap: Partially-initialized Entities Anti-pattern 4m
- Abstracting the DbContext with a Custom Unit of Work 4m
- The Relationship between Repositories and the Unit of Work 5m
- Summary 2m