Sdílet prostřednictvím


Update on the Entity Framework in .NET 4 and Visual Studio 2010

 


The information in this post is out of date.

Visit msdn.com/data/ef for the latest information on current and past releases of EF.


 

Since we shipped the .NET Framework 3.5 SP1 and Visual Studio 2008, we’ve been working on the next version of the Entity Framework.  During this release, we’ve been focused on 2 key areas:  1) enabling scenarios with the Entity Framework that you’ve told us to focus on and 2) laying the groundwork for Reporting Services to build on top of the Entity Framework.  In order to deliver on the first focus, enabling the scenarios you care about, we needed to provide early views into our designs (something we had not previously done publically) and incorporate your feedback on these designs back into the product.  To do this, we started the EFDesign blog in June 2008 and regularly posted early designs to elicit feedback.  In the coming weeks and months, we’ll first provide a quick sneak peek and then a more in depth series on the scenarios and functionality we’ve been targeting in the .NET Framework 4.0 and Visual Studio 2010 release.

The core of these blog series will be focused on the primary scenarios and patterns we’ve been working on throughout this release.  They are:

Development Approaches

  1. Model First development –  We’ve added functionality to the ADO.NET Entity Data Model designer to start from a Model and then have T-SQL and customized code generated.
  2. Testing applications that use the Entity Framework – Along with the patterns above we’ve added an interface, along with guidance, that enables better testability of applications that use the Entity Framework.

Architectural Concerns

  1. Persistence Ignorance – Enabling developers to use their own classes without needing to introduce interfaces or other elements specific to the Entity Framework. Check out the POCO Series here.
  2. Applications Patterns – Discussing patterns like the Repository and UnitOfWork patterns with guidance on how to use them with the Entity Framework
  3. Building N-Tier applications with the Entity Framework – Adding API’s and templates that make building N-Tier applications with the Entity Framework much easier.

Entity Framework Improvements

  1. Customization of Code Generation – Integration with the ADO.NET Entity Framework Designer and T4 Templates in Visual Studio to provide developer controlled code generation.
  2. Small things that make development of applications simpler – Adding things like Pluralization and Singularlization in the model, lazy loading, and more stored procedure mapping make building applications that use the Entity Framework much easier.
  3. Customizing Queries – Adding support for existing LINQ operators, recognizing a larger set of patterns with LINQ, writing model defined functions along with the ability to use these in LINQ, and a number of other ways to create and customize queries.
  4. SQL Generation Readability Improvements – Improving the readability, along with TSQL performance optimizations, of the generated queries to make it much easier to understand what is happening
  5. And much, much more

In the coming months we’ll be discussing all this plus a number of other interesting topics.  Keep coming back during this time to see what we’ve added and provide feedback on what you see.

Thanks,

The ADO.NET Entity Framework Team

Comments

  • Anonymous
    May 11, 2009
    PingBack from http://microsoft-sharepoint.simplynetdev.com/update-on-the-entity-framework-in-net-4-and-visual-studio-2010/

  • Anonymous
    May 11, 2009
    I’m off at TechEd this week talking to customers about the EF—especially about ways to be successful

  • Anonymous
    May 11, 2009
    Thank you for involving and listening to the needs of the community, especially since we really haven't been all that nice. The improvements look remarkable, and I for one am looking forward to giving EF another chance.

  • Anonymous
    May 11, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout

  • Anonymous
    May 12, 2009
    Overall this looks very good. I do have a language concern, though. You write: "We’ve added functionality to the ADO.NET Entity Data Model designer to start from a Model and then have T-SQL and customized code generated." "T-SQL" implies "not DB server-independent, but SQL Server-specific." Perhaps you mean "DDL" or "schema"?

  • Anonymous
    May 12, 2009
    Thank you for submitting this cool story - Trackback from progg.ru

  • Anonymous
    May 12, 2009
    Man, This is awesome news.....   One other thing i think would be nice is to have the option to not store the changes in the data context.. A lot of other orms store the changes in the actual entities them selves.. allowing a more disconnected pattern.. Perfect for web sites.

  • Anonymous
    May 12, 2009
    The comment has been removed

  • Anonymous
    May 12, 2009
    Thanks for making my day POCO/PI, testability, N-Tier and more support for the standard linq operators. Sweet. Will it be possible to send a poco over the wire and get it back with pessimistic locking?

  • Anonymous
    May 12, 2009
    @Craig Stuntz The default experience for Model First will generate DDL that works for SQL Server (and may work for other backends).  We have an extensibility story, which we will be talking about in a Model First series, that enables 3rd party provider writers (and any devleoper) to customize all parts of Model first. Carl Perry Program Manager ADO.NET Entity Framework

  • Anonymous
    May 13, 2009
    This is great, but I would have liked to have seen support  for multiple diagrams for the same EDMX - we've had something similar in SQL Server Management Studio for years.

  • Anonymous
    May 13, 2009
    I have started talking to developers about what they can expect in Entity Framework V2 such as in my

  • Anonymous
    May 13, 2009
    @TomPester, When you say pessimistic locking can you provide a bit more detail?  I'm assuming you don't mean locking the row from the first time the entity is read until the client updates it and send it back to the midtier to update. Carl Perry Program Manager ADO.NET Entity Framework

  • Anonymous
    May 13, 2009
    @Dave C Check back tomorrow when we post our self tracking entities post and tell us if it solves your question. Carl

  • Anonymous
    May 13, 2009
    @JasonBSteele We’re currently looking at this as something for the next release.  We would have liked to get it but there were more important things.  Keep up with the team blog because we’re going to talk about all the tools update here. Carl Program Manager Entity Framework

  • Anonymous
    May 13, 2009
    What to be Expecting of Entity Framework in .NET 4 The ADO.NET team started to release a series of posts

  • Anonymous
    May 14, 2009
    Lazy loading and adding support for existing LINQ operators is alone excellent news and will encourage people stuck at LINQ to SQL classes to move to the Entity framework. if (!cls...Reference.IsLoaded) cls...Reference.Load(); Don't want to see this anymore!

  • Anonymous
    May 14, 2009
    Windows Azure/Azure Service Framework (including .NET Services)/BizTalk David Pallmann has released 2.1 of Azure Storage Explorer with the new feature of modifying what is in storage including create or delete blob containers, blob items, queues, queue

  • Anonymous
    May 14, 2009
    SharePoint Create your own customized usage report solution step by step SharePoint WebPart Property

  • Anonymous
    May 16, 2009
    This week on Channel 9 at TechEd 2009, Brian is joined by Jeff Hadfield and Greg Duncan to discuss this

  • Anonymous
    May 18, 2009
    This is great new especially the Model first

  • Anonymous
    May 19, 2009
    does it support oracle natively now?

  • Anonymous
    May 19, 2009
    Has the ability to add Structural Annotations been added? How are they handled in the Designer (eg. ignored and preserved)?

  • Anonymous
    May 19, 2009
    I'm trying to create a "FK Association" but I can't associate the columns. Only EntityKey Properties can be associated.

  • Anonymous
    May 20, 2009
    @Andy, It has been added.  Right now you can not edit them in the designer but there are plans to do this later.  As you noted they are currently ignored and preserved.  We'll have some posts coming up to discuss that shortly.   @Henrique, FK Assocations aren't in Beta 1.  They will be available after Beta 1. Carl

  • Anonymous
    May 20, 2009
    Beta 1 has shipped!  You can find information about the Beta and pointers to the download here . 

  • Anonymous
    May 22, 2009
    For the list of updates and enhancements , checkout this post from ADO.NET team.

  • Anonymous
    June 03, 2009
    So are these changes going to be a preview before release?  Or is this only going to be sprung on us at the final release?

  • Anonymous
    June 03, 2009
    @Jason, All of the things above are available in the Beta 1 release of Visual Studio 2010 and .NET Framework 4.0.  You can find the main Beta page at http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx.   Carl

  • Anonymous
    June 10, 2009
      Entity Framework 4.0 Beta 1(又称EF V2)与 .NET 4.0 Beta 1 一起发布,包含了一系列的重要改进:自定义代码生成、延迟加载、N层支持、POCO支持

  • Anonymous
    June 15, 2009
    One of the biggest problems with the EF I have is the lack of events - most notably SavedChanges.  Is there any attempt to address this in the next version ?

  • Anonymous
    July 19, 2009
    So are these changes going to be a preview before release?  Or is this only going to be sprung on us at the final release?

  • Anonymous
    August 25, 2009
    EF is great, but there is one reason why i don't use it (currently using Linq to SQL): well, trivial example - if i have Products and Categories, *:1, in entiy Products i have only the navigable property Category, but there in no category_id. most often it's only enough to know the actual value of the foreign key, and there's no need to load entire entity (Category).

  • Anonymous
    October 16, 2009
    I'm using the preview version. I'm disappointed because I would really like to like this product. It has everything I ever wanted but creating a model from a database is a horrible event. It doesn't take all the relationships form the database, it generates lots of errors which have no normal description which can help me. And I'm still going to hate myself for still wanting to use this product because I don't think these seriously wrong issues are going to be solved. An ORM mapper should indicate problems it has with database models and give good solutions, not unfound errors.

  • Anonymous
    January 13, 2010
    Does Entity support to LINQ to any Database(oracle, MySql,..) not only Sql Server

  • Anonymous
    January 30, 2010
    Best  at practice and best   ADO.NET

  • Anonymous
    February 04, 2010
    this is a link very interesting, in spanish http://joseg2006.spaces.live.com/blog/cns!6C2A32296D845BE6!336.entry