6

I am trying to get LINQ to work with SQLite in C# .NET

I downloaded http://system.data.sqlite.org/downloads/1.0.92.0/sqlite-netFx451-setup-bundle-x86-2013-1.0.92.0.exe and it has an assembly in it:

System.Data.SQLite.Linq.dll

How can I get the LINQ provider working? How do I setup a data context? I have looked at many Google search results to no avail.

user3329538
  • 289
  • 1
  • 5
  • 12
  • See also this question http://stackoverflow.com/questions/9470583/creating-database-using-datacontext-and-system-data-sqlite-in-c-sharp – Astronavigator Aug 03 '14 at 10:15

1 Answers1

11

LINQ is just a specification. It requires an implementation (aka a provider) to actually work. Examples of implementations include LINQ to Objects, LINQ to XML, and Entity Framework.

The System.Data.SQLite.Linq assembly contains SQLite's Entity Framework provider. A while ago, I wrote a blog post on how to get started. See Entity Framework on SQLite.

bricelam
  • 28,825
  • 9
  • 92
  • 117