Entity Framework FAQ
Version 1.2 – 12/18/2008
New in this version of the FAQ…
· Updated: 1.2. Where else should I go to learn more about the EF?
· Updated: 1.6. Where can I learn about plans for the next release of the EF?
· Added: 4.2. Is there any way to use public, easily modifiable templates for EF code generation?
· Updated: 13.6. Does the EDM/EF support enums?
· Updated: 17.1. Does the Entity Framework support server-generated key values?
· Added: 17.5. If I use guids for my keys, can I generate them on the client rather than the server?
Contents
1..................... Introduction
Entity Classes & Architecture Patterns
2..................... Architecture and Patterns
3..................... Business Logic
4..................... Code Generation
5..................... Data Classes
Query
6..................... Query
7..................... LINQ to Entities
8..................... Entity SQL and ObjectQuery Builder Methods
Object Services & Using the APIs
9..................... Object Services
10.................... Lazy Load and Eager Load
11.................... Serialization and Web Services
12. .................. Databinding
Entity Services, Metadata & Mapping
13.................... EDM
14.................... Mapping
15.................... Metadata
16.................... EntityClient
17.................... EntityKey
Miscellaneous
18.................... Multi-threading
19.................... Performance
20.................... Resource Management
1. Introduction
1.1. About this FAQ…
You can find the latest version of the EF FAQ at http://blogs.msdn.com/dsimmons/pages/entity-framework-faq.aspx. This FAQ which was culled from a number of existing blog and forum posts. There’s no question that there is lots more data which belongs here. If you have further questions (or even better yet contributions), please don’t hesitate to add a comment here so that we can evolve this doc to be an increasingly valuable resource. I don’t have as much time as I’d like to update and add to this document myself, but I’m more than happy to coordinate the process if folks have contributions.
1.2. Where else should I go to learn more about the EF?
There are a number of good resources on the web, but here are a few good starting points:
· The MSDN Getting Started with the EF page: http://msdn.microsoft.com/en-us/data/aa937723.aspx
· The MSDN docs: http://msdn.microsoft.com/en-us/library/bb399572.aspx
· The EF forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=533&SiteID=1
· Samples: http://code.msdn.microsoft.com/adonetefx
· DataDeveloper.net: http://www.datadeveloper.net/
· dnrTV episodes which provide an intro to the EF:
o http://www.dnrtv.com/default.aspx?showNum=117
o http://www.dnrtv.com/default.aspx?showNum=118
· Blogs from the EF team:
o EF Design: http://blogs.msdn.com/efdesign/
o ADO.Net: http://blogs.msdn.com/adonet/
o Alex: http://blogs.msdn.com/alexj/
o Colin: http://blogs.msdn.com/meek/
o Danny: http://blogs.msdn.com/dsimmons/
o Diego: http://blogs.msdn.com/diego/
o Jarek: http://blogs.msdn.com/jkowalski/
o Ju-Yi: http://blogs.msdn.com/juyik/
o Tim: http://blogs.msdn.com/timmall/
· Blogs and other resources from outside Microsoft with EF topics:
o John Papa: http://johnpapa.net/
o Julie Lerman: http://www.thedatafarm.com/blog/
o Oakleaf Systems: http://oakleafblog.blogspot.com/
o Zeeshan Hirani created an Entity Framework Learning Guide.
1.3. Why use EDM? How does the EDM help?
The Entity Framework enables developers to reason about and write queries in terms of the EDM model rather than the logical schema of tables, joins, foreign keys, and so on. Many enterprise systems have multiple applications/databases with varying degrees of normalization, different schema styles depending on the group that developed it, and different naming conventions for tables and columns. Furthermore, in complex systems the entities of interest may be scattered across multiple rows in multiple tables, and changes to the logical schema can be painful to track within applications. By adding an additional level of abstraction, the EDM insulates the developer from the low level details of the logical model, and frees them to focus on the essential aspects of the application/problem at hand. For more information, see Introducing the Entity Framework.
Pasted from < http://blogs.msdn.com/adonet/archive/2007/05/30/entitysql.aspx >
1.4. How can I get the bits?
Step 1: Install .Net 3.5 RTM / VS 2008 RTM.
Step 2: Download and install SP1: http://msdn.microsoft.com/en-us/vstudio/products/cc533448.aspx
1.5. When will the Entity Framework be released?
The first release of the EF (v3.5sp1) is available now. It shipped as part of .Net 3.5 SP1 / VS 2008 SP1.
1.6. Where can I learn about plans for the next release of the EF?
The next release of the EF (v4.0) will ship with .Net 4.0 / VS 2010.
The EF Design blog is intended to significantly increase the transparency of design for the EF. From the first post to the blog:
Over the years Microsoft has been opening up the engineering processes incrementally. Long ago there were only betas, and that was the only chance to see and give feedback about a product before it shipped. Then we started to do Community Tech Previews (CTPs). CTPs enabled us to provide bits more often and gather feedback frequently. The goal with increasing the transparency of design is to take this one step further: we would like to enable folks that are interested in Entity Framework version 2 to follow the design topics as we discuss them, and have the opportunity to provide feedback right during the time where we are actively discussing a certain aspect and before we have made a final decision.
Another good resource is the EF Futures talk which Tim Mallalieu gave at PDC 2008.