开发者

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜