Database Reference
In-Depth Information
Version 5 of Entity Framework can also be used with Visual Studio 2010. Version 6 of Entity Framework, released
with Visual Studio 2013, has tooling/runtime support for Visual Studio 2012 and runtime support for Visual Studio 2010.
Note
To level set, let's take a brief look at some of the key components of the Entity Framework ecosystem. What
follows is not by any means a comprehensive description of Entity Framework; that would take hundreds of pages.
We'll look at just a few key areas to help get you oriented for the recipes that are at the heart of this topic.
The Model
Entity Framework is a technology with a strong focus on modeling. As you model with Entity Framework, you will
see many familiar genetic markers from previous technologies and patterns. For example, you will, no doubt, see a
resemblance to entity-relationship diagrams and the widely adopted conceptual, logical, and physical design layering
approach.
The model that you create in Entity Framework is characterized by a construct called an Entity Data Model
(EDM), which enables you to code against strongly typed entity classes, not database schema and objects. (Figure 1-2
shows this model in conceptual form.) The Entity Data Model enables you to customize the mappings between entity
classes and database tables to move beyond the classic, one-to-one mapping, or class-to-table mapping.
Figure 1-2. The Entity Data Model
In Figure 1-2 , note how the database tables (on the left) do not directly map to the entity classes, which we code
against (on the right). Instead, the mapping capabilities built into the Entity Data Model enable the developer to code
against a set of entity classes that more closely resemble the problem domain, as opposed to a highly normalized
database, designed for performance, scalability, and maintainability.
For example, note above how the Employees, Devices, and Phone numbers) are physically stored in three
different tables, which from a DBA perspective makes perfect sense. But the developer codes against a single
Employee entity class that contains a collection of Devices and Phone Numbers. From a developer and project
 
 
Search WWH ::




Custom Search