ADO.NET Entity Framework - When To Use It
by David Hayden ( Florida ASP.NET C# SQL Server Developer )
I mentioned earlier that the ADO.NET Entity Framework was Cut From .NET 3.5 and Visual Studio Orcas and we will have to wait until the first half of 2008 to see a release. In the meantime there is Linq to SQL which I have played with quite a bit and enjoy for O/R Mapping. I showed a trivial example of it not too long ago:
Linq to SQL Example Tutorial - Visual Studio ORCAS March 2007 CTP - ASP.NET
Right after the announcement that the ADO.NET Entity Framework was cut from .NET 3.5, the data access team at Microsoft came out with their strategy for data access that is worth reading here.
I really liked the part that discusses when to use the ADO.NET Entity Framework which I cut and pasted below. Most of it is about the ability to define Client Views on existing database schemas so that you can work with the data logically in the client application as opposed to being limited by the database schema. This is a great feature and one I was really looking forward to.
Anyway, here is when to use the ADO Entity Framework according to Microsoft:
“If you are writing an application that requires any of the following features, you should use the ADO.NET Entity Framework:
- The ability to define more flexible mapping to existing relational schema, for example:
- Mapping a single class to multiple tables
- Mapping to different types of inheritance
- Directly Modeling Many to Many relationships
- Mapping to an arbitrary query against the store
- The ability to query relational stores other than the Microsoft SQL Server family of products.
- The ability to share a model across Replication, Reporting Services, BI, Integration Services, etc.
- A full textual query language
- The ability to query a conceptual model without materializing results as objects”
In the post mentioned above, Linq to SQL is portrayed as more of a rapid development approach for simple projects where the database schema is the domain model and you are using SQL Server. Fair enough. I need that, too :)
Source: David Hayden ( Florida ASP.NET C# SQL Server Developer )