RDN Express Blog

Blog archive

Mapping Quest Drives .NET ORMs

If you've followed the data access story at Microsoft, the frameworks on ice, mutilated backwards compatibility, and ongoing twists and turns remain a bit of a mystery. This week, Microsoft shed some light on vNext of its "official" object-relational mapping tool, ADO.NET Entity Framework.

On Wednesday, the first preview of a "simpler API surface" and related functionality was made available for download. The productivity improvements are part of Entity Framework Feature Community Technical Preview 4, a feature set for EF4 (the second version of the framework) which was released in April with .NET 4.

When the productivity improvements were first announced in June, Rowan Miller, a Microsoft program manager on the Entity Framework Team,blogged:

"At the heart of the Entity Framework Productivity Improvements are two new types, DbContext and DbSet<TEntity> DbContext is a simplified alternative to ObjectContext and is the primary object for interacting with a database using a specific model. DbSet<TEntity> is a simplified alternative to ObjectSet<TEntity>and is used to perform CRUD operations against a specific type from the model. These new types can be used regardless of whether you created your model using the Entity Designer or code."

Miller stressed that the improvements did not signal a move toward yet another data access framework:

"We hope you will enjoy this simpler experience, but we should be quick to assure you that this is NOT a new data access technology. These improvements are built on the same technology for mapping, LINQ, providers and every other part of the Entity Framework. Think of this as a fast path to writing data access code using conventions over configuration, better tuned APIs and other techniques intended to reduce development time when using the EF."

Preview 4 also features Code-First enhancements. The Code-First programming model, when it ships, will enable developers to create Entity Data Models for the EF in C# or VB. Microsoft is trying to determine a ship vehicle for a Go-Live version of Code-First. In EF4, Microsoft added Model-First capability to the Entity Data Model designer. Entity Framework in .NET 3.5 SP1 only supported Database First (reverse engineering).

As Microsoft improves ease of use and flexibility of EF largely based on feedback from early adopters, Telerik appears to be going them one better. The company is releasing an updated version of its OpenAccess ORM this week. Among the new features is Round Trip Mapping, which supports forward or reverse mapping at any time in a project through a visual designer that is integrated with Visual Studio.

"The challenge that developers face today, including with Entity Framework, is that you have to make that choice up front in a project, am I going to do reverse mapping, or am I going to do forward mapping?" said Todd Anglin, Telerik chief evangelist.

With Round Trip Mapping, developers, for example, can start with reverse mapping, get their existing schema into code and then use forward mapping so that any changes can be easily applied to the database with the tool, easily keeping the database and code in sync.

"This allows you to develop as a developer and write code, and not have to change between a developer and DBA hat," said Anglin.

With Microsoft in the mix, ORMs are getting more attention in the .NET community. Express your thoughts on Entity Framework, OpenAccess, NHibernate and other frameworks. Drop me a line krichards@1105media.com.

Posted by Kathleen Richards on 07/15/2010 at 6:16 PM


Reader Comments:

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above