Reputation: 22458
I'm using Visual Studio 2010
In my project I was added a local database Data.sdf
Now I wanna use LINQ TO SQL
with it, but when I drag and drop the database table into the LINQ designer , I get the following error in Visual Studio :
"The selected object(s) use an unsupported database provider"
Am I miss something ?
How can I fix it ?
Upvotes: 3
Views: 8323
Reputation: 1157
In my case, the cause of this cryptic error was that I was using the wrong data provider. The data provider must be ".NET Framework Data Provider for SQL Server" (or, at least, it must not be "Microsoft SqlClient Data Provider for SQL Server" since that is the provider that was giving me the error).
To fix this for an existing connection:
Upvotes: 0
Reputation: 21
I had this issue but it was resolved after installing the EntitiFramework package from Nuget. ppm> install-package EntityFramework
Upvotes: 0
Reputation: 2583
Geometry, Geography and Hierarchy data types are not supported in LINQ to SQL.The only way it would be to not reference those columns and modify them so they can hold null values
Upvotes: 0
Reputation: 185693
LINQ-to-SQL is only officially supported when used with a full version of Microsoft SQL Server (including Express editions). While it's possible to use it with SQL Server CE (which is what it appears you're trying to do) and some others, extra steps are required.
You can either:
Upvotes: 4