Question
- Do applications really need to install EF6 to use another class library that used EF6 as a data retrieval mechanism (or am I mistaken)?
- How can I get around this and use EF?
Scenario
We are rewriting the old DAL with a new version that uses EF6 to receive data. Consumer applications do not require an EF context. Instead, they call intermediate functions (in the Business Logic folder in the DAL project), which in turn calls EF.
When I have a link to the application, my new DAL (connection string and provider links are added to it .config), the compiler complains about the missing provider:
The ADTI.NET provider could not be found with the Entity Framework provider with the invariant name "System.Data.SqlClient".
I can fix this by installing the EF6 package in my consumer application, but this is problematic. We have many consuming applications, many of which have parallel data access mechanisms, which often include older versions of EF. I need my DAL to be independent of my customers.
Can this be done?
source share