Chapter 31The ADO.NET Entity Framework Code Downloads for this Chapter

The code downloads for this chapter are found at on the Download Code tab. The code and any related support files are located in their own folder for this chapter.

One of the core requirements in business applications (and many other types of applications) is the ability to store and retrieve data in a database. However, that's easier said than done because the relational schema of a database does not blend well with the object hierarchies that you prefer to work with in code. To create and populate these object hierarchies required a lot of code to be written to transfer data from a data reader into a developer-friendly object model, which was then usually difficult to maintain. It was such a source of constant frustration that many developers turned to writing code generators or various other tools that automatically created the code to access a database based on its structure. However, code generators usually created a 1:1 mapping between the database structure and the object model, which was hardly ideal either, leading to a problem called “object relational impedance mismatch,” where how data was stored in the database did not necessarily have a direct relationship with how developers wanted to model the ...

Get Professional Visual Studio 2015 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.