为什么网上所有asp.net mvc样本都引用了UI中的DAL

时间:2015-09-09 07:44:19

标签: asp.net asp.net-mvc architecture

可能是我弄错了但是在我工作的所有公司中我们从未在UI层添加对Dal的引用(winforms-Web) 我是网络新手,但是经验丰富的winform-wcf开发人员,但我正在努力解决在UI中引用dal的问题。

在一个没有适当监督的大团队中,这是一场灾难。

为什么没有2个组成根

 1)WebUI just services classes (not wcf) when using wcf composition root is in there

 2)within the services that we inject there the repository.

我错过了明显的吗?

感谢

已更新

在所有样本中,我看到他们都使用DI(Unity-Autofac-Nject等..),他们通过接口连接存储库,这也需要具体类,因此引用DAL。可以这样做在服务层?

0 个答案:

没有答案