Question
- Do applications really have to install EF6 to consume another class library that used EF6 as it's underlying data retrieval mechanism (or am I mistaken)?
- How can I work around this and still use EF?
Scenario
We are rewriting an old DAL with a new version that uses EF6 to get it's data. Consumer apps don't call on the EF context. They instead call intermediate functions (in a Business Logic folder in the DAL project), that in turn calls on EF.
When I have a consuming app reference my new DAL (connection string and provider references added to it's .config), the compiler complains of a missing provider:
No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'.
I can remedy this by installing the EF6 package into my consuming application, but this is problematic. We have tons of consuming apps, many with parallel data access mechanisms that often include older versions of EF. I need my DAL to be independent from my consumers.
Can this be done?