I’m looking for a .NET ORM that supports code first data modeling like Microsoft Entity Framework. I used Entity Framework before but had some performance issues. So also I use BLToolkit as a data access layer and database created directly by T-SQL (a middle size project). This solution has nice performance but it’s very annoying to update the code models after updating the database tables.
So it would be nice if somebody shares the experience about using ORMs with code first data modeling approach.
If you were having performance problems with Entity Framework, you should try and figure out why that is, not just assume EF sucks and never use it again. You may have been doing something simple that simply making a couple of changes would fix.
Also, EF5 has improved performance significantly as well. But you need VS 2012 to take advantage of those (EF5 on .net 4 doesn’t get the performance improvements).
nHibernate is of course a viable option (particularly Fluent nHibernate), but I find it to be a lot more work than EF because the support tools for EF are much better. Even using Code first, it’s a breeze to use EF Power Tools to reverse engineer an existing data model to code first.
switching to another framework is no guarantee of performance improvement either, because using ORM’s requires a fundamental shift in thinking. It’s very easy to get an ORM to generate very poor code if you’re not paying attention.