Working with the Entity Framework

Like LINQ to SQL, Entity Framework (EF) is a technology that enables you to program against objects that are backed by tables within a relational database. And because they share that same overall goal, most of the concepts we covered with LINQ to SQL apply to EF-based applications as well. The notable difference with EF is the level of abstraction it provides. Whereas LINQ to SQL is a direct map of objects to database tables, EF maps database tables to an Entity Data Model (EDM). From there, you can map objects to the EDM.

Within an EF’s EDM, there are actually two discrete models that are maintained by Visual Studio: the conceptual model (think application objects) and the storage model (the database that stores ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.