views:

540

answers:

2

I'm working on a small Windows Form application that will be run on a Netbook computer. I will control the hardware/environment, meaning I provide the hardware and software to the end user. It will have a single database on the local drive that only this one app will access. It will have a couple tables and a few hundred (or maybe a couple thousands) rows in one of the tables. No foreign keys, etc. Really simple. I just need a place to store this data and perform simple queries and map to objects (ORM).

I understand the basics of Nhibernate and EF4 and have experimented a little with both. I'd use EF4 with POCOs if I decided to use EF.

I don't think performance is an issue because its a small amount of data. But, Netbooks are not real powerful so I'm wondering which of these two products would offer me a more lightweight solution.

We're a Microsoft shop and not using EF4 yet, but I think we may be going that way as our data engine of the future, so this may influence my decision. But this app is kind of an island of its own so I could potentially use nhibernate without too much political fallout. :) My general impression of EF4 and its wizards and generators and magic is that its bloated. I may be wrong, but thats the feeling I get. I'd hate to select EF4 and find out its bogging down my Netbook's performance.

Any comments are welcome. I know this is a wide open subject. ;)

+2  A: 

I don't think the difference between the two is even measurable with a small amount of data. The sql query itself will take much longer than the work done by the orm.

Yes, this is a wide open subject. You will only know the difference for the exact case you use when you measure it.

Personally, I wouldn't use an orm at all for just a couple of tables. I also wouldn't think about performance before I have a performance problem.

Paco
+1  A: 

I like NHibernate, and still wait EF to impress me, but for your not so complex application I would not use neither of them.

Instead I'll advice to use Linq2Sql, the most easiest solution and enough powerful.

I think NHibernate and EF is for more complex applications

xajler
Ahh, LINQ to SQL may also be an option. Hadn't thought about that. Thanks.
Brawney
And also performance wise Linq2Sql is better then EF/nHibernate
Amitabh