Using a entity framework 5 project dll with Web pr

2019-05-29 09:50发布

问题:

I have a logging solution that uses EF5 which I am referencing in a new a new web application that uses EF 6. I am getting the following error when consuming the anything from that logging dll:

Method not found: 'System.Data.Objects.ObjectContext System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()'

I know why I am getting the error, it's because namespaces have changed from EF5 to EF6, but is there a way I can have the two co-exist without having to change my EF5 project which is being used elsewhere?