Add DLL with EF6 to main project with EF5

0

I have email Dll that use own dependency (EF6) and I want to add it to Main project that use EF5 but I got error when I want to insert in the database inside the DLL. I am not able to change the version of EF5 in main project to EF6. How can I say to Class-library to use own dependency?

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)
c#
dependency-injection
.net-framework-version
asked on Stack Overflow Oct 9, 2018 by user1445018

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0