我有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.
更多推荐
解决方案中的参考问题
发布评论