解决方案中的参考问题 [英] problem in references in solution

查看:117
本文介绍了解决方案中的参考问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有DAL(其中的EF),BLL和mvc App的解决方案。



我已经提到了在mvc应用程序中的BLL和BLL引用中的DAL

App给了我错误说:



错误1类型'EntityFrameWork_DAL.KMS_TopicDetails'是在未引用的程序集中定义。必须添加对程序集'EntityFrameWork_DAL,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'的引用.C:\ Users \ Administrator {\\ Documentments \ Visual Studio 2012 \ WebSites\MccEntityFrameworkSoln \ MVcEntityFramework \Controllers\Default1Controller.cs 18 13 MvcEntityFramework




解决这个问题我添加了DAL参考在Mvc App中它工作了。

我们现在可以看到BLL层没用..



我在DAL中使用了存储库模式




请帮忙



问候,

RM。

I have solution with DAL(EF in it),BLL and mvc App.

i have put reference of DAL in BLL and BLL reference in mvc App.
App gave me error saying :


"Error 1 The type 'EntityFrameWork_DAL.KMS_TopicDetails' is defined in an assembly that is not referenced. You must add a reference to assembly 'EntityFrameWork_DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. C:\Users\Administrator\Documents\Visual Studio 2012\WebSites\MvcEntityFrameworkSoln\MvcEntityFramework\Controllers\Default1Controller.cs 18 13 MvcEntityFramework"


to solve this i added DAL reference in Mvc App and it worked.
as we can see now BLL layer is useless..

I used repository pattern in DAL


Please help

Regards,
RM.

推荐答案

Th原因是因为您正在使用需要引用EntityFramework的Entity模型。您只需要在主应用程序中引用EntityFramework dll。你的BLL应该仍然控制数据和ui的交互性,所以它没有用处。
The reason for this is because you are using the Entity models which require references to the EntityFramework. You only need to reference the EntityFramework dll in your main app. Your BLL should still govern interactivity of the data and ui so it is not useless.


这篇关于解决方案中的参考问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆