How do you use NHibernate and ED?

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
edowney
Posts: 14
Joined: Thu 07 Mar 2013 13:10

How do you use NHibernate and ED?

Post by edowney » Wed 25 Jun 2014 17:19

So, needless to say, if you take a look you'll see all kinds of posts from me trying to make ED+NHibernate work. I currently use NHibernate 2.2 using the format laid out in the book "NHibernate with ASP.NET Problem Design Solution". I've been running like this for several years now and am quite happy with it. However I feel it's time to upgrade to Nhibernate 3.3.x. I saw ED and thought wow that would be awesome to have something gen up code for me. While I have been able to get a domain, repository and application layer going I kinda lost the service layer (I try to follow domain driven design as well to the best of my ability).

My new approach is to ask those who obviously have gotten it to work for them if they could share some code snipets, pearls of wisdom, etc in this post. Maybe the way I'm trying to implement my code is the problem - wouldn't be the first time.

One thing I've noticed is the lack of any sample projects from devart. Or, if it exists, they are hiding it well. I did download the 50 mapping examples which was nice. But I want to see an entity model file that I can open and see how they implement things like the EntityObject template or the RepositoryAndUnitOfWork template. Those are the two that seem to mimic what I do in my current production system (just can't seem to make all of the connections, apparently). A complete visual studio project with two or three objects would be awesome as well.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: How do you use NHibernate and ED?

Post by Shalex » Thu 18 Sep 2014 14:03

Sorry for the delay.
edowney wrote:I want to see an entity model file that I can open and see how they implement things like the EntityObject template or the RepositoryAndUnitOfWork template.
Please refer to this simple walkthrough: http://forums.devart.com/viewtopic.php? ... 678#p85646.
In case of NHibernate, just use the Devart NHibernate Model item instead of Devart Entity Model, and the NHibernate template instead of ObjectContext. Also add references to NHibernate assemblies instead of EntityFramework ones in your project.

Post Reply