cannot issue a simple linq query in a new project

Oct 11, 2011 at 6:21 AM


I've started a new project deciding to linq as my query language.

I'm uing Visual Studio Express 2010. and Sqlite as the database.

I've installed the proper Sqlite provider. and created a scheme (edmx file) for the database using the designer with no effort.

inside the code i can see the new namespace of the database which means the first phase worked. I have'nt done something else

besides that, only created a scheme for one table in the database and checking that the namespace is there.

now, I've tried to issue the following line :

var subjects = from c in dbModel.subjects where c.fid == 0 select c;

dbModel.subjects is the table.

there are 2 errors with in this line. the first one is on the table:

"Could not find an implementation of the query pattern for source type 'dbModel.subjects'. 'Where' not found.

and the second error is on 'c.fid', since I could intellisense the '.fid' field which exists inside the table.

help help, this line looks innocent and clean. but doesn't work.

maybe I've skipped something while building the scheme.

BTW: for everyone who tries to use Sqlite with Visual Studio. it doesn't work. BUT there is one fix:

you download the newest .NET 4 provider for sqlite from HERE:

AND THEN, you open the file:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VWDExpress.exe.config

and add these lines to the <runtime> section:

<assemblyIdentity name="Microsoft.VisualStudio.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />  
<bindingRedirect oldVersion="" newVersion="" />  

By doing that you will have a brand new Sqlite provider in the system that acctually works.


please help me with my bug, I'm new to LINQ and realy wanna start creating some stufff.




Feb 27, 2013 at 7:28 AM

It looks like Kellerman Software has a MySQL LINQ Provider: