My existing project was using EF5 and SQL Anywhere 12. Now I am upgrading to EF 6 and SQL Anywhere 17. I followed this tutorial http://dcx.sap.com/index.html#sqla170/en/html/37fb9e8558e94547b66156b9298be16f.html When I compile my project I get error on the edmx file. It says "Unable to cast object of type 'Sap.Data.SQLAnywhere.SAProviderServices' to type 'System.Data.Common.DbProviderServices'."
If I create a connection using Server Explorer in Visual studio 2013, I am able to create a connection. But if I add a model (database first) in my project, I get error on the edmx file.
asked 04 Aug '15, 05:50
Since you are using SQL Anywhere 17 there should be support for EF6 but one does need to confirm that support has been installed.
You will find the instructions for either Code First or Model First projects to either a new or existing database all begin with these two steps:
cd %SQLANY17%\Assembly\v4 SetupVSPackage.exe /i /v EF6
The latter is probably the missing step and why this is not working.
There are additional steps required, including one to modify the < providers > section of your app.config file.
Hopefully that's a start in the right direction.