Chapter 1. Data access reloaded: Entity Framework
Figure 1.1. The Order table has a related OrderDetail table that contains its details.
Figure 1.2. The Order class contains data from the Order table.
Figure 1.3. The Order2 table contains columns for the new data and is related to the Order table. In the object model, there’s no new class—just a new property on the Order class.
Figure 1.4. The relationship between Order and OrderDetail in the object model is expressed with properties.
Figure 1.5. In the database, the Product and Supplier tables are related via the ProductSupplier table. In the model, the Product and Supplier classes are directly related using properties.
Figure 1.6. An excerpt of the new Order table with the new billing address field
Figure 1.7. The Supplier and Customer classes inherit from Company.
Figure 1.8. Shirt and Shoes inherit from Product, which is referenced by OrderDetail.
Figure 1.9. The overall architecture of Entity Framework: The query languages lie on top of Object Services, which relies on Entity Client to interact with the database. Entity Client uses the standard ADO.NET providers to physically communicate with the database. The EDM is a layer that’s referenced by all the others and is used by them to obtain metadata about classes.
Figure 1.10. How data is received by the Object Services layer
Chapter 2. Getting started with Entity Framework
Figure 2.1. OrderIT use cases