.net c#无法连接到更新数据库上的SQL DB

Unable to connect to my SQL DB on Update-Database
2020-11-21
  •  译文(汉语)
  •  原文(英语)

我试图首先使用代码学习MVC 5.

我将所有实体都移到了域项目,并且当前正在从WebUi项目引用域.我已经将Ninject和MVC安装到WebUI和Domain项目中.另外,我仍然将Identity Entity Framework软件包安装到Domain类中,因为我仍然想使用mvc附带的默认角色和用户类.

当前图像中有以下问题.任何帮助,将不胜感激.

无法连接到更新数据库上的SQL DB

速聊1:
您应该提供一个我们可以实际看到和使用的小例子.太小而难以阅读的屏幕快照会使诊断变得困难.请阅读stackoverflow.com/help/mcve
解决过程1

抱歉,屏幕截图不足,代码不足.最后,我弄清楚了域库中没有必要的引用才能使其按预期工作.将库添加到我的WebUI和Domain项目中可以解决我的问题.

I am trying to learn MVC 5 using code first.

I moved all my entities to the domain project and currently referencing the Domain from the WebUi project. I have installed Ninject and MVC into both WebUI and the Domain projects. Also I have installed the Identity Entity Framework package into the Domain class as I still want to use the default roles and users class that comes with the mvc.

Currently having the problems below in the image. any help would be appreciated.

Unable to connect to my SQL DB on Update-Database

Talk1:
You shoudl supply a small example that we can actually see and use. A screen shoot that is too small to easily read makes diagnosis difficult. Please read stackoverflow.com/help/mcve
Solutions1

I apologize for the screenshot and not enough code. I ended up figuring out that I did not have the necessary references within my domain library for it to work as expected. Adding in the library to both my WebUI and Domain projects solved my problem.

转载于:https://stackoverflow.com/questions/28398469/unable-to-connect-to-my-sql-db-on-update-database

本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文

留言回复
我们只提供高质量资源,素材,源码,坚持 下了就能用 原则,让客户花了钱觉得值
上班时间 : 周一至周五9:00-17:30 期待您的加入