Based on your description and the error code, you will just need to ensure that your DataContext class inheirits from IDisposible:
public class YourDataContextClass : DbContext,IDisposable
{
//Your class details here
}
And then install the EntityFramework in your references project using Manage NuGet Packages.
In last, setup the connectionstring in your references project config file.
Now, it should work fine.
本文介绍了解决Entity Framework中出现特定错误的方法。主要内容包括确保数据上下文类继承自IDisposable接口,安装Entity Framework到项目引用中,并正确设置项目的连接字符串。
3584

被折叠的 条评论
为什么被折叠?



