Entity Framework - Code First instead of nHibernate

Topics: Announcements
Jun 25, 2012 at 3:57 PM

I am completely new to the Orchard Project. I just noticed, that it uses nHibernate as a DAL and that the main reason for this choice was immaturity of EF - Code First in the past. I would like to ask if there are any consideration for switching to EF - Code First now or in the near future?

Jun 25, 2012 at 4:58 PM

Sounds fork worthy if you really prefer EF.  However, when working with Orchard, you rarely, if ever, interact directly with NHibernate.  The data access stuff is abstracted so I don't know if there would be a benefit of using EF.  Like I said though, Orchard is designed so that you could implement your own data access if you wanted.  

Jun 25, 2012 at 9:03 PM

There is no plan to migrate to EF as we are using auto mapping features that EF doesn't have. To be more precise, every time you have a PartRecord, a fake property is created and mapped so that queries can be done efficiently without the model to know about it.

Jun 26, 2012 at 5:31 AM

I'd go farther and say there are very firm plans to never move to EF. It wouldn't make any sense and would be a huge risk to the project for no benefit at all.