Home  /  Questions  /  Question

76   96.3
Mar 21, 2012

Recommendation of ORM for large applications

Is object relationship mapping (ORM) ex. entity framework recommended for large application base spanning across 150 projects or so. With more than 500 tables and respective mappings?

 1 comment
The ORM is a pain atleast in our case where in the loading of the DB schema into the Entity model took a very long time sometimes spans to morethan 20 mins. On top of it any inclusion of new table or so, we need to reload/generate the model again. Is there anyway where in we can split the DB schema into small models and handle them independently? So that entire db model need not have to be regenerated again? is anyone experience breaking the complete db model into minor EF models and used unit of work pattern for affecting the changes to morethan one EF model? is it possible? --- Pavan Kumar Kota  Mar 26, 2012

340   99.9
Mar 21, 2012
Your choice depends on what your requirements are. The top 3 ORMs for large projects (in my experience) are:
  • Entity Framework - http://msdn.microsoft.com/en-us/library/aa697427%28v=vs.80%29.aspx
  • NHibernate - http://http://nhforge.org
  • CSLA - http://www.lhotka.net/cslanet/
These three above are very large and have a lot of bells and whistles. Picking one of these will depend on the level of experience of the developers. These are much slower that hand-coding with datareaders, and the lighter ORMs out there.

Here is a list of some very light and fast ORMs. I only recommend these, if the developers are very good with SQL.
  • Dapper - http://code.google.com/p/dapper-dot-net/
  • ORMLite - https://github.com/ServiceStack/ServiceStack.OrmLite
  • PetaPoco - http://www.toptensoftware.com/petapoco/
  • Massive - https://github.com/robconery/massive
  • Simple.Data - https://github.com/markrendle/Simple.Data
These are extremely fast, but lack a lot of the bells and whistles associated with the heavier ORMs.

1,128   99.9
Mar 23, 2012
Great response from Hector, but I would also recommend you to evaluate LLBLGen, http://llblgen.com

1,364   100.0
Mar 25, 2012
Great answers.. Just my two cents...

We are recently migrating our core banking solutions to asp.net mvc and EF4.1+.  So far good.  The application has
about 450 tables, with complex logics for various banking operations..

The EF is coming good for us, in terms of performance as well.  We are yet to face any issues.... But we are still in the POC's stage and hopefully within in couple of months we will be fully moving to EF, if we don't hit any major roadblock.

 1 comment
Do you have to add a "RowVersion" column to all your tables? Thanks --- Dennis Tucker  Sep 24, 2012