Dan Simmons from the Entity Framework team at Microsoft made a nice post comparing the Entity Framework to other existing tools. I wanted to pick a little bone with his comparison to NHibernate. I don’t think he said anything inaccurate, and he was very fair minded, but he left out the crucial fact in any consideration of using NHibernate versus the Entity Framework. The Entity Framework is very intrusive into your application, but NHibernate is not. NHibernate lets me use POCO’s to model the business process in a database agnostic way. The Entity Framework wants me to bake EF infrastructure directly into my business objects.
The major problem I have with the Entity Framework is very apparent in Dan Simmon’s post. The EF team, and its advocates in the blogosphere, are strictly focused on data. The last I checked, an application, system, or service usually consists of more than just getting data in and out of a database. Some of that other stuff is quite challenging as well. I’d prefer to be able to make that other stuff work in peace without data access infrastructure concerns bleeding into my business classes.
I would really like to challenge the EF team and the EF cheerleaders to be more cognizant of the entire application architecture instead of focusing strictly on the grubby details of data access.