views:

66

answers:

4

For a basic ERP (DB with around 150 tables, WinForm app) which would run on a classic LAN network (1 server and up to 25 clients) would you recomend EF4 or DataSet ?

LINQ2SQL is NOT an option !

+4  A: 

EF4. DataSet is an old technology, EF is in many ways a reaction to the problems with datasets.

We recently built an app, where part of it was CRUD operations on 80 Tables. Before EF we would have used Enterprise Library and DataSets. We would have estimated 1 hour per table for writing the CRUD operation and the unit test. With EF this was replaced mostly with autogenerated code.

Shiraz Bhaiji
Do you have unit/integration tests for your EF CRUD code?
Michael Maddox
@Michael Maddox, yes, it is actually an integration test since it hits the database. We put it inside a transaction scope so that it does not change the database. Basically they check that no one changes the scripts that create the database without also updating the EF model. With a code first approach this would be a little different.
Shiraz Bhaiji
+2  A: 

You can choose EF based on the application logic, EF can give you more options but I think we can't decide based on number of tables.

Check this article which will help you to decide:

Why use the Entity Framework?

Also check this nice video: Data Development GPS: Guidance for Choosing the Right Data Access Technology for Your Application Today

Amr ElGarhy
A: 

that's a pretty open ended question with not much supporting information. There are a ton of factors involved in this kind of decision. Is it just you developing or a team. Either way, what experience do you have with EF? If you don't have a lot of experience and there's a tight timeline, it may be quicker to get the job done with Datasets.

Those types of questions aside, I'm a big fan of ORM and I think it makes life easier in the long run. But it does have a learning curve if you're not familiar with some of the concepts and especially the gotchas (like Select N+1 issues).

Chris Conway
I am the the only developer... and pls read comment above!
Virtuo
It is a classic desktop (more OLTP/ less OLAP) application with MSSQL2008X database in backend (most of the logic is built in stored procedures and relations) about sales, procurement, orders, inventory, production but on a small scale!
Virtuo
+1  A: 

Even if you don't choose EF4, DataSets aren't the only option.

I'd much rather work with POCOs than DataSets.

Objects are far easier to manipulate than DataSets. For example, validating data in a POCO is trivial and easily maintained. In a DataSet it is neither.

Joe R