我有使用自己的依赖项(EF6)的电子邮件Dll,我想将其添加到使用EF5的Main项目中,但是当我想在DLL的数据库中插入时出现错误。我无法将主项目中的EF5版本更改为EF6。 我如何对Class-library使用自己的依赖关系?
using (var unitOfWork = new UnitOfWork())
{
int retry = 0;
IRepository<string> repository = new EfRepository<string>(unitOfWork);
var parameters = new List<SqlParameter> {}
}
I got error in UnitOfWork line;
Error Message:
could not load file or assembly 'entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089' or one of its dependencies. the located assembly's manifest definition does not match the assembly reference. (exception from hresult: 0x80131040)