Books & Videos

Table of Contents

  1. Chapter 1 Introducing the DbContext API

    1. Getting the DbContext API into Your Project

    2. Looking at Some Highlights of the DbContext API

    3. Working with the BreakAway Model

    4. Ensuring DbContext Instances Get Disposed

  2. Chapter 2 Querying with DbContext

    1. Writing Queries with LINQ to Entities

    2. Querying All the Data from a Set

    3. Using LINQ for Sorting, Filtering, and More

    4. Finding a Single Object

    5. Querying Local Data

    6. Loading Related Data

    7. Querying Contents of a Collection Navigation Property

  3. Chapter 3 Adding, Changing, and Deleting Entities

    1. Working with Single Entities

    2. Working with Relationships

    3. Working with Change Tracking

    4. Using Snapshot Change Tracking

    5. Enabling and Working with Change Tracking Proxies

    6. Fetching Entities Without Change Tracking

  4. Chapter 4 Working with Disconnected Entities Including N-Tier Applications

    1. A Simple Operation on a Disconnected Graph

    2. Exploring the Challenges of N-Tier

    3. Understanding How DbContext Responds to Setting the State of a Single Entity

    4. Setting the State for Multiple Entities in an Entity Graph

    5. Building a Generic Approach to Track State Locally

    6. Tracking Individually Modified Properties

  5. Chapter 5 Change Tracker API

    1. Change Tracking Information and Operations for a Single Entity

    2. Working with the State Property

    3. Working with Current, Original, and Database Values

    4. Working with Individual Properties

    5. Refreshing an Entity from the Database

    6. Change Tracking Information and Operations for Multiple Entities

    7. Using the Change Tracker API in Application Scenarios

  6. Chapter 6 Validating with the Validation API

    1. Defining and Triggering Validation: An Overview

    2. Validating a Single Object on Demand with GetValidationResult

    3. Specifying Property Rules with ValidationAttribute Data Annotations

    4. Inspecting Validation Result Details

    5. Exploring More ValidationAttributes

    6. Validating Individual Properties on Demand

    7. Specifying Type-Level Validation Rules

    8. Understanding How EF Combines Validations

    9. Validating Multiple Objects

    10. Validating When Saving Changes

  7. Chapter 7 Customizing Validations

    1. Overriding ValidateEntity in the DbContext

    2. Considering Different Ways to Leverage ValidateEntity

    3. Updating Data During SaveChanges

    4. Overriding SaveChanges When Validation Occurs

    5. Using the IDictionary Parameter of ValidateEntity

    6. Controlling Which Entities Are Validated in ValidateEntity

  8. Chapter 8 Using DbContext in Advanced Scenarios

    1. Moving Between ObjectContext and DbContext

    2. Leveraging SQL Server Operators Exposed in SqlFunctions

    3. Querying Derived Types with DbSet

    4. Understanding the Interface Property Limitation

    5. Considering Automated Testing with DbContext

    6. Reducing Database Hits in Testing with IDbSet

    7. Accessing the Database Directly from DbContext

    8. Providing Multiple Targeted Contexts in Your Application

  9. Chapter 9 What’s Coming Next for Entity Framework

    1. Understanding Entity Framework’s Version Numbers

    2. Entity Framework 5.0