Geeks With Blogs
Catherine Russell Architect, President of "Women In Information Technology" Group

It seems like typed datasets provide the same type of object layout as the entity framework.
What's the difference and why should I use one or the other?

We'll start at the fundamental difference:

DataSets give you a basic in-memory database that you can query and fill from a data source such as a database.
Queries against datasets are executed against in-memory data.

Entity Framework gives you a translation layer that translates LINQ queries to your database's SQL dialect.
Queries against the EF ObjectContext are always executed against the database.

Strongly typed datasets wrap your rows with named property accessorts.

Entity Framework classes do not wrap rows - they have relationships to other classes,
and, in .NET 4.0, can be plain old CLR objects that derive from "object".
Also, Entity Framework classes support inheritance and various mapping patterns, such as splitting
a class's members across multiple tables, hiding join tabels with many-to-many relationships, and so on.

On the down side, the entity framework can be more complex to program against for n-tier scenarios and scenarios,  and has a higher learning curve. Which technology you pick depends on your needs...

To learn more, go to:


Posted on Wednesday, June 23, 2010 12:25 PM ASP.NET | Back to top

Comments on this post: What's the difference between datasets and the entity framework?

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

Copyright © CatherineRussell | Powered by: