PacktLib: Entity Framework 4.1: Expert’s Cookbook

Entity Framework 4.1: Expert's Cookbook


About the Authors

About the Reviewers


Improving Entity Framework in the Real World


Improving Entity Framework by using code first

Creating mock database connections

Implementing the repository pattern

Implementing the unit of work pattern

Testing queries

Creating databases from code

Testing queries for performance

Performing load testing against a database

Understanding the Fluent Configuration API


Improving property maps

Creating one-to-one maps

Creating one-to-many maps

Creating many-to-many maps

Mapping one table to many objects

Mapping many tables to one object

Handling inheritance based on database values

Handling complex key maps

Handling Validation in Entity Framework


Validating simple properties

Validating complex properties

Validating collection properties

Creating custom property validation

Improving MVC UI with entity framework validation

Working with Transactions and Stored Procedures


Using transaction scopes

Handling multiple context transactions

Executing stored procedures

Retrieving entities with stored procedures

Updating entities with stored procedures

Improving Entity Framework with Query Libraries


Creating reusable queries

Improving entity and library reuse

Implementing composed queries

Increasing performance with code access

Improving query testing

Improving Complex Query Scenarios


Grouping at runtime without Lambda

Handling explicit loading

Improving complex where clauses

Implementing the specification pattern

Using Concurrent and Parallel Processing


Implementing optimistic concurrency

Managing parallel contexts

Handling data retrieval in highly-threaded environments

Attaching objects with unit of work

Improving multiple context performance

Improving Entity Framework with Complex Business Scenarios


Handling soft delete

Implementing refreshing data on save

Capturing the audit data

Improving MVC 3 applications