Version 5.0 will have it...
Dave's seem hit directly on a nerve with this post:
Let me take this apart for a second.
Linq for Entities (Orcas) is going to ship (earliest) at the end of this year. Sometime in the future (probably 2010), there will be a new version that will have compelling technical advantage over what NHibernate offers today. Therefor, you should go with Linq for Entities.
Q.E.D ??
He goes on to say that NHibernate is an ORM and Linq for Entities is not, therefor the comparision is flawed.
NHibernate as a simple Object Relational Mapper works, and has tremendous benefits, but that is not even scratching the surface. You can use NHibernate to do quite a bit more. From AOP for your entities, full fledged IOC container, contextful manipulation etc.
I am using NHibernate in a project when it is actually spitting out different objects based on the customer that is currently working with the system. So I have a base entity Salary, and I have NorthwindSalary, SouthwindSalary, etc. When I need to calculate a salary, I just fetch it from the database, NHibernate is taking care of me getting the correct entity (not service) from the database, which contains the logic for calculating the salary.
I would like to hear about the features that Dave talks about, and what scenarios are they useful for.
Comments
Hey Oren -
You are right (and I said it in my post) it's more the vision than what's likely to be delivered with Orcas (given the CTP). I am not about to trade in our significant investment in NHibernate especially because we can get LINQ w/ the ORM we all know and love.
What I do think is that they are on to is an interesting paradigm shift in how we think about "Entity Layers" and modeling the static structure of entities. Behavior, it seems to me, will live for a long time in the OO world. Workflow/Activity approaches just seem too "loosey-goosey" and they don't have the steam of TDD/Refactoring or the huge body of knowledge. To me I will use them as orchestration layers on top of domain model, etc.
Anyway, I digress...
I will have to investigate the alternative use cases for NHibernate you mentioned, but, ultimately, I think EDM (specifically, keep in mind I had to title my blog post to tease) is a quite different animal. I am unsure what I can or cannot say under NDA so I'd suggest you shoot an email to the ADO.NET team.
/ Dave
Comment preview