Page 1 of 1

Trying to implement NHibernate

Posted: Wed 11 Jun 2014 18:36
by edowney
I'm a huge proponent for domain driven design and really love NHibernate. Currently I'm working on creating a domain in ED using the NHibernate template and Repository And Unit of Work template but I'm missing some options that I would think would be part of the template (mostly the standard crud stuff). Does Devart have any example projects I could look at supporting NHibernate? Thanx!

Re: Trying to implement NHibernate

Posted: Thu 12 Jun 2014 07:25
by Shalex
Please refer to If this doesn't help, specify the exact option(s) you are missing.

Re: Trying to implement NHibernate

Posted: Fri 13 Jun 2014 18:02
by edowney
Unfortunately that didn't answer my question directly although the samples are a really good resource so thanks for that.

What I am looking for is something that will autogenerate the CRUD (Create, Read, Update, Delete) routines that will work with unit of work template. I've based a lot of my current nhibernate development on a book called .NET Domain-Driven Design with C#: Problem - Design - Solution by Tim McCarthy and Domain Driven Design by Eric Evans. In McCarthy's book he lays out a great n-tier NHibernate framework with an Application, Domain, Infrastructure, Repository and Service layer. I've been using this setup now for several years with great success.

The thought of being able to 'draw' the domain (classes and properties anyway) and auto-generate much of the code and the database schema was too much to resist when I first saw Entity Developer. Now it's just a matter of trying to figure out how to make it do what I need it to do to fit into my workflow.

Re: Trying to implement NHibernate

Posted: Fri 13 Jun 2014 19:03
by edowney
Ah, ok - never mind. I found what I was looking for. I found the NHibernateRepository.cs file and his friends which contained most of what I was looking for. Still no answer to the service layer but I guess I'll just have to roll my own.