解决方案中的参考问题

编程入门 行业动态 更新时间:2024-10-24 04:36:52
本文介绍了解决方案中的参考问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有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.

更多推荐

解决方案中的参考问题

本文发布于:2023-11-07 06:34:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565781.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:解决方案

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!