Entity Framework 6 in the Enterprise
Entity Framework is the most widely-used ORM for .NET software development. This course will show you how to incorporate Entity Framework into your advanced software architecture.
What you'll learn
Have you reached the limitation of the introductory lessons on Entity Framework when trying to implement EF into your real world business solutions? In this course, Entity Framework 6 in the Enterprise, you will learn advanced patterns for incorporating Entity Framework into enterprise level architecture. First, you'll learn patterns for encapsulating your EF logic and how to choose which best suits your needs depending on what you need to accomplish. Next, discover how to align your EF code with the many beneficial patterns, from Domain-Driven Design in your software from breaking data models apart for Bounded Contexts, to persisting tightly-controlled aggregates. Finally, testing code without hitting the database gets easier with the test mock support introduced in EF6. You'll also get to see how to mock a variety of EF database interactions that are triggered by your business logic. When you're finished with this advanced Entity Framework course, you'll not only better understand using EF in your real-world software, but you may gain some general software architecture wisdom along the way. Software required: Visual Studio 2013 or higher, Entity Framework 6 or higher.
Table of contents
- Version Check 0m
- Introduction 1m
- Course Prerequisites 1m
- Module and Course Overview 1m
- Just Say 'No' to Demoware 1m
- Architecture Footprint: Starting Point 3m
- Pros and Cons of Learning from Demoware 3m
- First Pass at Breaking Apart a Single-project Solution 2m
- Removing Entity Framework from the UI 4m
- Lessons from Bounded Contexts and Other DDD Patterns 5m
- Testing When EF6 is Involved 7m
- Summary 2m
- Resources 0m
- Introduction 0m
- Overview 1m
- Implementing a Generic Repository 8m
- Non-tracking Alternatives to a Generic FindByKey Method 5m
- Adding Eager Loading to the Generic Repository 2m
- Benefiting from Dependency Injection and Inversion of Control 4m
- Implementing an IoC Container in the App 9m
- Customized Encapsulation for Complex Behaviors 5m
- Implementing the Shopping Cart Persistence 6m
- Controller to Service to Data Class: A Quick Walkthrough 2m
- Summary 2m
- Resources 1m
- Introduction 1m
- Overview 1m
- What are Domain-driven Design and DDD Bounded Contexts? 4m
- How Does an EF DbContext Relate to DDD Bounded Context? 4m
- Setting Up to Refactor Our Solution Into Bounded Contexts 3m
- Digging into the Refactored Solution 7m
- Pros and Cons of Reverse Engineering from an Existing Database 7m
- Building Migrations for Multiple DbContexts 4m
- Implementing Code First Migrations for the Maintenance DbContext 4m
- More DbContext Migrations and a View into the Same Database 7m
- Summary 1m
- Resources 0m
- Introduction 0m
- Overview 1m
- Should You Be Persisting Directly from the Domain? 3m
- Rich Domain Models Over Anemic Domain Models 3m
- Private Setters and Constructors 5m
- Scenarios Where EF Can't Handle Private Accessors 6m
- DDD Loves One Way Navigations, So Does EF for 1:* 7m
- DDD, EF, and Many-to-Many Relationships 1m
- Scenarios Where EF Requires Bi-directional Navigations 5m
- DDD Prefers Value Objects Over One-to-one Relationships 6m
- Seeing How EF Respond to Value Objects 4m
- Additional Advice About DDD Patterns and EF 4m
- Considering CQRS Patterns with Entity Framework Data Models 3m
- Summary 2m
- Resources 1m
- Introduction 0m
- Overview 1m
- What Is Mocking and Why Use It in These Tests? 4m
- Planning What to Mock in a Test 5m
- Converting the First Test to Mock Its EF Work 5m
- Making the Mocked DbSet Reusable 4m
- Mocking Entity Framework Queries 8m
- Mocking EF Include 5m
- Mocking EF's Asynchronous Methods 5m
- Avoiding the 'Mock Everything' Trap 5m
- Refactoring the Tests Based on Their Database Responsibilities 3m
- Summary 1m
- Resources 1m