首页 > 代码库 > 其他的项目调用DAL项目中的EF Model

其他的项目调用DAL项目中的EF Model




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.