on 2015 Aug 04 6:50 AM
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.
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.
See: http://dcx.sap.com/index.html#sqla170/en/html/01ddc33d4c9542daa9d3027f266957dc.html
Hopefully that's a start in the right direction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.