Preface; Audience; Contents of This Book; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments;
Chapter 1: Introducing the DbContext API;
1.1 Getting the DbContext API into Your Project;
1.2 Looking at Some Highlights of the DbContext API;
1.3 Working with the BreakAway Model;
1.4 Ensuring DbContext Instances Get Disposed;
Chapter 2: Querying with DbContext;
2.1 Writing Queries with LINQ to Entities;
2.2 Querying All the Data from a Set;
2.3 Using LINQ for Sorting, Filtering, and More;
2.4 Finding a Single Object;
2.5 Querying Local Data;
2.6 Loading Related Data;
2.7 Querying Contents of a Collection Navigation Property;
Chapter 3: Adding, Changing, and Deleting Entities;
3.1 Working with Single Entities;
3.2 Working with Relationships;
3.3 Working with Change Tracking;
3.4 Using Snapshot Change Tracking;
3.5 Enabling and Working with Change Tracking Proxies;
3.6 Fetching Entities Without Change Tracking;
Chapter 4: Working with Disconnected Entities Including N-Tier Applications;
4.1 A Simple Operation on a Disconnected Graph;
4.2 Exploring the Challenges of N-Tier;
4.3 Understanding How DbContext Responds to Setting the State of a Single Entity;
4.4 Setting the State for Multiple Entities in an Entity Graph;
4.5 Building a Generic Approach to Track State Locally;
4.6 Tracking Individually Modified Properties;
Chapter 5: Change Tracker API;
5.1 Change Tracking Information and Operations for a Single Entity;
5.2 Working with the State Property;
5.3 Working with Current, Original, and Database Values;
5.4 Working with Individual Properties;
5.5 Refreshing an Entity from the Database;
5.6 Change Tracking Information and Operations for Multiple Entities;
5.7 Using the Change Tracker API in Application Scenarios;
Chapter 6: Validating with the Validation API;
6.1 Defining and Triggering Validation: An Overview;
6.2 Validating a Single Object on Demand with GetValidationResult;
6.3 Specifying Property Rules with ValidationAttribute Data Annotations;
6.4 Inspecting Validation Result Details;
6.5 Exploring More ValidationAttributes;
6.6 Validating Individual Properties on Demand;
6.7 Specifying Type-Level Validation Rules;
6.8 Understanding How EF Combines Validations;
6.9 Validating Multiple Objects;
6.10 Validating When Saving Changes;
Chapter 7: Customizing Validations;
7.1 Overriding ValidateEntity in the DbContext;
7.2 Considering Different Ways to Leverage ValidateEntity;
7.3 Updating Data During SaveChanges;
7.4 Overriding SaveChanges When Validation Occurs;
7.5 Using the IDictionary Parameter of ValidateEntity;
7.6 Controlling Which Entities Are Validated in ValidateEntity;
Chapter 8: Using DbContext in Advanced Scenarios;
8.1 Moving Between ObjectContext and DbContext;
8.2 Leveraging SQL Server Operators Exposed in SqlFunctions;
8.3 Querying Derived Types with DbSet;
8.4 Understanding the Interface Property Limitation;
8.5 Considering Automated Testing with DbContext;
8.6 Reducing Database Hits in Testing with IDbSet;
8.7 Accessing the Database Directly from DbContext;
8.8 Providing Multiple Targeted Contexts in Your Application;
Chapter 9: What's Coming Next for Entity Framework;
9.1 Understanding Entity Framework's Version Numbers;
9.2 Entity Framework
5.0;