bryan
bryan

Reputation: 1051

Using Fluent NHibernate and still having seperate Domain and Data?

I'm working on understanding the basics of NHibernate and specifically Fluent NHibernate. I've been over dozens of semi-useful samples and I keep coming back to the same thing where it seems there's a total muddling of the Domain (business layer) and the Model or data mappings. In a really quick sample if I separate the Entities from the Mappings, the Mappings still need the Entities obviously, and then my BLL is referred to in my DAL which makes me ill. Is there something I'm missing here? I know samples are just that, but not one has separation of the BLL and DAL.

Are there any known examples of this?

Thanks.

Upvotes: 0

Views: 124

Answers (1)

eulerfx
eulerfx

Reputation: 37719

There is no problem with referencing the BLL from the DAL in the DDD world. The DAL in DDD consists of repositories and class mapping for entities in the business layer, and therefore those repositories much be 'aware' of the domain. The repository interface is declared in the business layer and implemented in the DAL. Take a look at the Onion Architecture article series for a deeper explanation.

Upvotes: 2

Related Questions