Compartilhar via


ADO.Net Entity Framework Feature Community Technology Preview Released!

 


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.


 

We’ve released an update of the Entity Framework Feature CTP!  The updated CTP includes many requested improvements and added features we’ve gathered from the community since the release of our first CTP and supports installation with Visual Studio 2010 Beta 2 as well.  Some of the improvements and added features added since the last CTP include:

  • Enhancements to Code Only, including-
    • Fine Grained Control over model
      • Specify Navigation Property Inverses
      • Specify Property Facets
      • Complex Types
    • Customizable Mappings
      • Change Table Name, Column Names
      • Specify Custom Inheritance Strategy
      • Entity Splitting
      • Join Table Mapping
  • The Self-Tracking Entities template, allowing code generation of EF entities that facilitate ease of use in WCF/N-Tier scenarios-
    • Foreign Key associations: Self-Tracking Entities can take advantage of the Foreign Keys in the Model feature added in .NET 4.0 Beta 2 and can contain both navigation properties and Foreign Key properties for the same association. Fix-up logic has been tidied up to be aware of FKs.
    • Support for Silverlight 3: Generated entity types can be compiled to target Silverlight 3 and can be used in combination with Silverlight-enabled WCF services.
    • Databinding support: Generated entity types now implement INotifyPropertyChanged and use ObservableCollections allowing them to work better with WPF and Silverlight databinding.
    • Richer concurrency control support: Self-Tracking Entities now support the same variations for optimistic concurrency control as the Entity Framework. Original values are preserved for all required properties according to their concurrency mode in the Entity Data Model.
    • Improved independent association support: The approach for managing entities with dangling references has been reengineered to avoid unnecessary database round-trips.
    • New and improved methods: AcceptChanges, StartTracking, StopTracking where added and the existing MarkAsX methods are now extension methods.
    • Generated code improvements and refactoring: The ApplyChanges implementation has been moved to the Context template so the template has no binary dependencies besides Entity Framework. Generated code for entity types have been refactored.

Over the next few weeks we’ll be posting walkthroughs that dive deeper into each feature.  We also have a few features we plan to release in CTP format in the next few months including an updated POCO code gen template.  Your comments and feedback are most welcome; please give us your comments here, our design blog, through Connect or through the ADO.NET Entity Framework pre-release forums.  Please stay tuned for more news!

Thanks!

The Entity Framework Team

Comments

  • Anonymous
    November 04, 2009
    The comment has been removed

  • Anonymous
    November 05, 2009
    @ Kathleen- I'm not sure what specific guidance you need.  EF should scale well with the number of users for your application.  There are limits in that the EF context targets a single database but there's nothing limiting you from having your client or middle layer span heterogeneous operations.  Feel free to send me specific questions at timlav@microsoft.com.  

  • Anonymous
    November 05, 2009
    I don't see a POCO T4 template installed with the CTP.  The T4 template for self-tracking entities is there, but the template for POCO's seems to be missing.

  • Anonymous
    November 06, 2009
    Hi Tony, We didn't get the ability to update the POCO template for Beta2 as a part of this CTP release - but we are working on releasing that at some point in the near future.

  • Anonymous
    November 09, 2009
    The comment has been removed

  • Anonymous
    November 09, 2009
    In same boat as Steve Johnston.  Would very much like to hear about approaches to address this problem, especially new enhancements in EF 4 that will help resolve. Thanks.

  • Anonymous
    November 10, 2009
    Hi, just wondering what happened with EntityChangeTrackerAdapter from CTP1 ? What should we use instead? BR Thomas

  • Anonymous
    November 11, 2009
    Could you please explain more about support for Silverlight 3 and how generated entity types can be compiled to target Silverlight 3?

  • Anonymous
    November 11, 2009
    I agree with Steve and Rob. It should be possible to have multiple "views" on the model, comparable to the database diagrams in SQL Server.

  • Anonymous
    November 12, 2009
    We want to do quick performance evaluation on Self-Tracking Entities and POCO.  The walkthrough from http://blogs.msdn.com/adonet/archive/2009/06.aspx does not work with CTP 2.  Do you have an updated walkthrough that works with CTP 2?

  • Anonymous
    November 12, 2009
    Is there a list of changes in EF4?

  • Anonymous
    November 12, 2009
    Hello jwinata, I've posted a walk-through for self-tracking entities using CTP 2 here: http://blog.tonysneed.com/2009/11/12/ef-4-0-n-tier-support-take-2

  • Anonymous
    November 21, 2009
    I have a problem when using the tt files from another folder than the one containing the edmx file:{”Mapping and metadata information could not be found for EntityType ‘Nais.Time.Model.Admin.Eventlog’.”} When using the non-STE version it works fine. Could it have someting to do with not using the ModelNamespace? kr, Michel.

  • Anonymous
    November 22, 2009
    You need to change the template to point to where the edmx file is located.  For example: To reference it from another project, open Northwind.Types.tt and modify inputFile initialization as follows: string inputFile = @"..NorthwindDataNorthwind.edmx";

  • Anonymous
    November 22, 2009
    I found a solution. Nothing to do with splitting the generated context and types nor with more complex folder/namespace layouts. I noticed that the context's MetadataWorkspace did not contain the right clr types for mapping. I had a solution using both the EntityObject Generator and the Self-Tracking Entity (STE) Generator. It seems they do not play well together... When using an STE context while there were other models present using non-STE contexts, the MetadataWorkspace was 'polluted' with clr types of the non-STE model, sometimes the needed clr types were not present at all, hence the mapping failure I received. Making my solution use only STE contexts, the MetadataWorkspace remains clean, and only the clr types of the required model are present. I have no clue on what exactly causes the loading of non-STE clr types when using an STE model. I do believe however that a solution should be able to use a mixture of T4 templates, some models might need tracking, others not. kr, Michel.

  • Anonymous
    November 28, 2009
    I agree with Steve and Rob too. The problem is a very big one we has been encountered when we in atual projects, there always more than 100 table in database.

  • Anonymous
    December 01, 2009
    I am missing the new T4 templates in VS2010 Beta2 after installing EF4FeatureCTP2. What ist wrong?

  • Anonymous
    December 08, 2009
    The EF Features CTP2 drops the POCO templates. Is there somewhere I could get them? Is there a way to extract them from the CTP1 EF Features? Thanks...

  • Anonymous
    December 19, 2009
    I installed the VS2010 Ultimate Beta 2 and EF CTP2. So where is the Entity Framework project template?

  • Anonymous
    March 08, 2011
    distressing in the extreme to find that Michel's problem reported in 2009 is still present in latest EF4. I have a v-large model situation, so was split into 2 models, one for transactional data, one for reference (read-only) data. So far so good. Then converted the tx one to STE. Now have same problem as Michel.  SO converted the ref one also to STE.  Now have piles of compile errors, complaining about duplicate defintiiosn for "ObjectChangeTracker" and many others.  Both models had their own unique namespace in the application so I don;t know what these duplicates are being detected .. any suggestion on this would be greatly appreciated.  rick.piovesan@detaya.com

  • Anonymous
    March 08, 2011
    @rick Just to make things clear, my problem was only when mixing STE and non-STE, and I did not check this anymore for EF4. Using STE for both models did work for me, and it still does, although I must say that we changed the T4s a lot...