cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to open an entity framework model in LinqSample

Former Member
0 Kudos

Hi

I'm trying to open SampleModel.edmx that comes with LinqSample project, which in turns comes as a sample with SQLA 16. I receive the following message: "Unable to cast object of type 'iAnywhere.Data.SQLAnywhere.SAProviderServices' to type 'System.Data.Common.DBProviderServices'". The problem exists in both Visual Studio 2013 and 2015, and after I followed all installation instructions. Any advice is very much welcome.

Leonid Gvirtz

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member207653
Active Participant
0 Kudos

I have tested with Visual Studio Professional 2013 update 5 and SQL Anywhere 16 and I can open LinqSample SampleModel.edmx on Windows 8.1.

Did you have to convert the project to open it in VS 2013? Have you selected .NET Framework 4.5?

Former Member
0 Kudos

Hi Mirco

After re-installation of both Visual Studio and SQL Anywhere, I was able to open the model and run LinqSample application. However, when I tried to update the model from the database, I received a message that DDEX provider is not installed. Then, I decided to run "SetupVSPackage.exe /i /v EF6" since I didn't do it after the re-installation of SQL Anywhere. Now, I returned to the previous situation - an attempt to open a model causes the error from my initial post ("Unable to cast...") and I'm unable to revert it back, at least I don't know how.

Please help, I'm just trying to show to one of my customers that they will be able to work with SQLA using Entity Framework in the same or similar way that it works with SQL Server.

Thanks in advance

Leonid Gvirtz

former_member207653
Active Participant
0 Kudos

I would start making sure that you are running SQL Anywhere 16.0.0.1993 or above. EF 6 support has been introduced since then. Then open the readme_EBF.HTML file that is in C:\Program Files\SQL Anywhere 16 (by default) and search for Engineering Case # 768717 and confirm you have followed the instructions please.