How can I solve this NHibernate Querying in an n-tier architecture?

前端 未结 2 986
无人及你
无人及你 2020-12-06 04:04

I\'ve hit a wall with trying to decouple NHibernate from my services layer. My architecture looks like this:

web -> services -> repositories -> nhiber

2条回答
  •  广开言路
    2020-12-06 04:27

    Thank you for the responses! I understand what you are saying, but these answers do not solve my problem. Because of the state of the system I'm writing, I am unable to change my architecture. Instead, I am just going to keep all of my sql/hql/criteria api queries inside of the repository layer instead of trying to expose some sort of a complex query class to my services. This approach should work just fine. For my next architectural approach though, I will consider the points made in the other answers.

提交回复
热议问题