码迷,mamicode.com
首页 > 其他好文 > 详细

使用三层架构+EF添加单元测试

时间:2019-11-05 21:29:26      阅读:109      评论:0      收藏:0      [点我收藏+]

标签:server   image   png   笔记   测试的   make   sql   operation   mamicode   

在运行测试的时候抛异常了:

“System.InvalidOperationException”类型的异常在 mscorlib.dll 中发生,但未在用户代码中进行处理

The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer‘ registered in the application config file for the ADO.NET provider with invariant name ‘System.Data.SqlClient‘ could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

技术图片

经过一些列的百度最后,看到这篇博客https://blog.csdn.net/haipurui0001/article/details/79355160的一句话,就尝试了一下,居然成功了

奈何本人梅闻花,只能把这4个都引用进去(这四个dll都可以在当前项目的packages中可以找到)

技术图片

 

 将这些dll引入后,再次测试成功了,做一下笔记

技术图片

 

 

 

 

使用三层架构+EF添加单元测试

标签:server   image   png   笔记   测试的   make   sql   operation   mamicode   

原文地址:https://www.cnblogs.com/licm/p/11801496.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!