Books & Videos

Table of Contents

  1. Chapter 1 Introducing the ADO.NET Entity Framework

    1. The Entity Relationship Model: Programming Against a Model, Not the Database

    2. The Entity Data Model: A Client-Side Data Model

    3. Entities: Blueprints for Business Classes

    4. The Backend Database: Your Choice

    5. Entity Framework Features: APIs and Tools

    6. The Entity Framework and WCF Services

    7. What About ADO.NET DataSets and LINQ to SQL?

    8. Entity Framework Pain Points Are Fading Away

    9. Programming the Entity Framework

  2. Chapter 2 Exploring the Entity Data Model

    1. Why Use an Entity Data Model?

    2. The EDM Within the Entity Framework

    3. Walkthrough: Building Your First EDM

    4. Inspecting the EDM in the Designer Window

    5. The Model’s Supporting Metadata

    6. Viewing the Model in the Model Browser

    7. Viewing the Model’s Raw XML

    8. CSDL: The Conceptual Schema

    9. SSDL: The Store Schema

    10. MSL: The Mappings

    11. Database Views in the EDM

    12. Summary

  3. Chapter 3 Querying Entity Data Models

    1. Query the Model, Not the Database

    2. Your First EDM Query

    3. Querying with LINQ to Entities

    4. Querying with Object Services and Entity SQL

    5. Querying with Methods

    6. The Shortest Query

    7. ObjectQuery, ObjectSet, and LINQ to Entities

    8. Querying with EntityClient to Return Streamed Data

    9. Translating Entity Queries to Database Queries

    10. Avoiding Inadvertent Query Execution

    11. Summary

  4. Chapter 4 Exploring LINQ to Entities in Greater Depth

    1. Getting Ready with Some New Lingo

    2. Projections in Queries

    3. Projections in LINQ to Entities

    4. Using Navigations in Queries

    5. Joins and Nested Queries

    6. Grouping

    7. Shaping Data Returned by Queries

    8. Loading Related Data

    9. Retrieving a Single Entity

    10. Finding More Query Samples

    11. Summary

  5. Chapter 5 Exploring Entity SQL in Greater Depth

    1. Literals in Entity SQL

    2. Projecting in Entity SQL

    3. Using Navigation in Entity SQL Queries

    4. Using Joins

    5. Nesting Queries

    6. Grouping in Entity SQL

    7. Shaping Data with Entity SQL

    8. Understanding Entity SQL’s Wrapped and Unwrapped Results

    9. Summary

  6. Chapter 6 Modifying Entities and Saving Changes

    1. Keeping Track of Entities

    2. Saving Changes Back to the Database

    3. Inserting New Objects

    4. Inserting New Parents and Children

    5. Deleting Entities

    6. Summary

  7. Chapter 7 Using Stored Procedures with the EDM

    1. Updating the Model from a Database

    2. Working with Functions

    3. Mapping Functions to Entities

    4. Using the EDM Designer Model Browser to Import Additional Functions into Your Model

    5. Mapping the First of the Read Stored Procedures: ContactsbyState

    6. Mapping a Function to a Scalar Type

    7. Mapping a Function to a Complex Type

    8. Summary

  8. Chapter 8 Implementing a More Real-World Model

    1. Introducing the BreakAway Geek Adventures Business Model and Legacy Database

    2. Creating a Separate Project for an EDM

    3. Inspecting and Cleaning Up a New EDM

    4. Setting Default Values

    5. Mapping Stored Procedures

    6. Working with Many-to-Many Relationships

    7. Inspecting the Completed BreakAway Model

    8. Building the BreakAway Model Assembly

    9. Summary

  9. Chapter 9 Data Binding with Windows Forms and WPF Applications

    1. Data Binding with Windows Forms Applications

    2. Data Binding with WPF Applications

    3. Summary

  10. Chapter 10 Working with Object Services

    1. Where Does Object Services Fit into the Framework?

    2. Processing Queries

    3. Materializing Objects

    4. Managing Object State

    5. Managing Relationships

    6. Taking Control of ObjectState

    7. Sending Changes Back to the Database

    8. Implementing Serialization, Data Binding, and More

    9. Summary

  11. Chapter 11 Customizing Entities

    1. Partial Classes

    2. Using Partial Methods

    3. Subscribing to Event Handlers

    4. Creating Your Own Partial Methods and Properties

    5. Overriding Default Code Generation

    6. Summary

  12. Chapter 12 Data Binding with RAD ASP.NET Applications

    1. Using the EntityDataSource Control to Access Flat Data

    2. Understanding How the EntityDataSource Retrieves and Updates Your Data

    3. Working with Related EntityReference Data

    4. Working with Hierarchical Data in a Master/Detail Form

    5. Exploring EntityDataSource Events

    6. Building Dynamic Data Websites

    7. Summary

  13. Chapter 13 Creating and Using POCO Entities

    1. Creating POCO Classes

    2. Change Tracking with POCOs

    3. Loading Related Data with POCOs

    4. Exploring and Correcting POCOs’ Impact on Two-Way Relationships

    5. Using Proxies to Enable Change Notification, Lazy Loading, and Relationship Fix-Up

    6. Using T4 to Generate POCO Classes

    7. Creating a Model That Works with Preexisting Classes

    8. Code First: Using Entity Framework with No Model at All

    9. Summary

  14. Chapter 14 Customizing Entity Data Models Using the EDM Designer

    1. Mapping Table per Type Inheritance for Tables That Describe Derived Types

    2. Mapping Unique Foreign Keys

    3. Mapping an Entity to More Than One Table

    4. Splitting a Single Table into Multiple Entities

    5. Filtering Entities with Conditional Mapping

    6. Implementing Table per Hierarchy Inheritance for Tables That Contain Multiple Types

    7. Creating Complex Types to Encapsulate Sets of Properties

    8. Using Additional Customization Options

    9. Summary

  15. Chapter 15 Defining EDM Mappings That Are Not Supported by the Designer

    1. Using Model-Defined Functions

    2. Mapping Table per Concrete (TPC) Type Inheritance for Tables with Overlapping Fields

    3. Using QueryView to Create Read-Only Entities and Other Specialized Mappings

    4. Summary

  16. Chapter 16 Gaining Additional Stored Procedure and View Support in the Raw XML

    1. Reviewing Procedures, Views, and UDFs in the EDM

    2. Working with Stored Procedures That Return Data

    3. Executing Queries on Demand with ExecuteStoreQuery

    4. Adding Native Queries to the Model

    5. Adding Native Views to the Model

    6. Using Commands That Affect the Database

    7. Mapping Insert/Update/Delete to Types Within an Inheritance Structure

    8. Implementing and Querying with User-Defined Functions (UDFs)

    9. Summary

  17. Chapter 17 Using EntityObjects in WCF Services

    1. Planning for an Entity Framework–Agnostic Client

    2. Building a Simple WCF Service with EntityObjects

    3. Implementing the Service Interface

    4. Building a Simple Console App to Consume an EntityObject Service

    5. Creating WCF Data Services with Entities

    6. Understanding How WCF RIA Services Relates to the Entity Framework

    7. Summary

  18. Chapter 18 Using POCOs and Self-Tracking Entities in WCF Services

    1. Creating WCF-Friendly POCO Classes

    2. Building a WCF Service That Uses POCO Classes

    3. Using the Self-Tracking Entities Template for WCF Services

    4. Using POCO Entities with WCF Data and RIA Services

    5. Sorting Out the Many Options for Creating Services

    6. Summary

  19. Chapter 19 Working with Relationships and Associations

    1. Deconstructing Relationships in the Entity Data Model

    2. Understanding the Major Differences Between Foreign Key Associations and Independent Associations

    3. Deconstructing Relationships Between Instantiated Entities

    4. Defining Relationships Between Entities

    5. Learning a Few Last Tricks to Make You a Relationship Pro

    6. Summary

  20. Chapter 20 Real World Apps: Connections, Transactions, Performance, and More

    1. Entity Framework and Connections

    2. Fine-Tuning Transactions

    3. Understanding Security

    4. Fine-Tuning Performance

    5. Exploiting Multithreaded Applications

    6. Exploiting .NET 4 Parallel Computing

    7. Summary

  21. Chapter 21 Manipulating Entities with ObjectStateManager and MetadataWorkspace

    1. Manipulating Entities and Their State with ObjectStateManager

    2. Using ObjectStateManager to Build an EntityState Visualizer

    3. Using the MetadataWorkspace

    4. Building Dynamic Queries and Reading Results

    5. Creating and Manipulating Entities Dynamically

    6. Summary

  22. Chapter 22 Handling Exceptions

    1. Preparing for Exceptions

    2. Handling EntityConnectionString Exceptions

    3. Handling Query Compilation Exceptions

    4. Creating a Common Wrapper to Handle Query Execution Exceptions

    5. Handling Exceptions Thrown During SaveChanges Command Execution

    6. Handling Concurrency Exceptions

    7. Summary

  23. Chapter 23 Planning for Concurrency Problems

    1. Understanding Database Concurrency Conflicts

    2. Understanding Optimistic Concurrency Options in the Entity Framework

    3. Implementing Optimistic Concurrency with the Entity Framework

    4. Handling OptimisticConcurrencyExceptions

    5. Handling Concurrency Exceptions at a Lower Level

    6. Handling Exceptions When Transactions Are Your Own

    7. Summary

  24. Chapter 24 Building Persistent Ignorant, Testable Applications

    1. Testing the BreakAway Application Components

    2. Getting Started with Testing

    3. Creating Persistent Ignorant Entities

    4. Building Tests That Do Not Hit the Database

    5. Using the New Infrastructure in Your Application

    6. Application Architecture Benefits from Designing Testable Code

    7. Considering Mocking Frameworks?

    8. Summary

  25. Chapter 25 Domain-Centric Modeling

    1. Creating a Model and Database Using Model First

    2. Using the Feature CTP Code-First Add-On

    3. Using SQL Server Modeling’s “M” Language

    4. Summary

  26. Chapter 26 Using Entities in Layered Client-Side Applications

    1. Isolating the ObjectContext

    2. Separating Entity-Specific Logic from ObjectContext Logic

    3. Working with POCO Entities

    4. Summary

  27. Chapter 27 Building Layered Web Applications

    1. Understanding How ObjectContext Fits into the Web Page Life Cycle

    2. Building an N-Tier Web Forms Application

    3. Building an ASP.NET MVC Application

    4. Editing Entities and Graphs on an MVC Application

    5. Summary

  1. Appendix Entity Framework Assemblies and Namespaces

    1. Unpacking the Entity Framework Files

    2. Exploring the Namespaces

  2. Appendix Data-Binding with Complex Types

    1. Using Complex Types with ASP.NET EntityDataSource

    2. Identifying Unexpected Behavior When Binding Complex Types

  3. Appendix Additional Details About Entity Data Model Metadata

    1. Seeing EDMX Schema Validation in Action

    2. Additional Conceptual Model Details

    3. Additional SSDL Metadata Details

    4. Additional MSL Metadata Details

  4. Colophon