Geeks With Blogs

News

This blog has moved to ericnelson.wordpress.com

 Subscribe in a reader

Add to Google Reader or Homepage


Links
View my teams slideshare
These postings are provided "AS IS" with no warranties, and confer no rights.



IUpdateable has moved to ericnelson.wordpress.com Please visit http://ericnelson.wordpress.com

I thought it would be useful (at least to me!) to summarise the new stuff in Entity Framework 4 given it actually comes in 2 parts.

The list is a simplified and categorised version of this and this.

General

  • Foreign Keys now added: EF 4 now includes a new type of associations (Foreign Key Associations) that allow you to have Foreign Key properties on your entities. They are the default although the EF v1 Independent Associations remain.
  • Lazy Loading on by Default in new Models: Also name change from Beta 1. context.ContextOptions.LazyLoadingEnabled = true is placed in the constructor
  • Support for Binary Keys: The EF now allows you to have binary property types (and varbinary storage columns) mapped as Entity Key / Foreign Key.
  • ObjectMaterialized event: Can write logic that is executed immediately after an object has been materialized. 
  • Improved Database Generation: SQL CE support has been added plus customization of database generation is significantly simpler.
  • More Improvements to the generated SQL
  • LINQ to Entities improvements

POCO

  • Improvements to POCO Support: Automatically fixes nav properties and FKs on DetectChanges and SaveChanges. Collections can also be declared as ISet<T>
  • EntityDataSource support for Query Extenders and POCO: EntityDataSource now includes support for the new ASP.NET Query Extenders and POCO entities.

Self Tracking Entities

  • Object Services API improvements to enable N-Tier and Self Tracking Entities: ObjectStateEntry.GetUpdatableOriginalValues method provides a access to an updatable data record that you can use to establish the original state of an entity at the property level.
  • Works with Foreign Key associations: Including Fix-up logic has been tidied up to be aware of FKs.
  • Support for Silverlight 3 via WCF
  • Better Silverlight and WPF Databinding support: Generated entity types now implement INotifyPropertyChanged and use ObservableCollections
  • Richer concurrency control support: Original values are preserved for all required properties according to their concurrency mode in the Entity Data Model.
  • Fewer Round Trips: 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.

Code Only

  • Fine Grained Control over model: Specify Navigation Property Inverses, Property Facets and Complex Types

  • Customizable Mappings: Change Table and Column Names. Support Custom Inheritance Strategy. Enable Entity Splitting and Join Table Mapping

Designer

  • Navigation Property Management: Users can now delete and add navigation properties, enabling the creation of one-way associations.
  • New Extensibility APIs: New APIs enable custom code to run on model wizards etc.
  • Auto Generation of Complex Types from Stored Procedures: Plus auto update when a stored procedure definition changes.
  • Greatly Improved Facet Management in the Designer 
Posted on Friday, November 6, 2009 4:37 PM .NET 4.0 , Data , Entity Framework , ORM | Back to top


Comments on this post: Summary of the Entity Framework 4 changes introduced with Beta 2 and CTP 2

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © Eric Nelson | Powered by: GeeksWithBlogs.net | Join free