LINQ with SQLite (linqtosql)

I have a small project that needs storage (I choose SQLite), and I got a good result with the ADO DLL for .Net for Sqlite .

After installation, I noticed that it contains SQLLinq.dll. Before investigating too much effort, and because I don't see a good example on the Internet, I would like to know if anyone has a good result with SQLite and LINQ?

* If linqtosql works the same as always, the SQL database let me know. I was interested with Dll when I saw this, because I had never used Linqtosql before, and I thought it was a great opportunity to try it,

+56
sqlite linq linq-to-sql
Oct 30 '08 at 12:53
source share
9 answers

I recently discovered DBLinq , which supports SQLite among other databases:

+48
Jan 19 '09 at 21:38
source share
— -

From my own experience, the Microsoft SQL Compact Framework is REAL NO-GO. It is REALLY FREAKING slow and its Query Analyzer is just very poor. I had to ask my team to rewrite all the plumbing code of my Windows Mobile component to get rid of the terrible features of SQL CE.

+10
Nov 05 '09 at 14:28
source share

LINQ to SQL only supports SQL Server / Compact, but SQLite people can write their own LINQ provider with the assembly name.

If in this case you could use the LINQ query syntax by adding a link to it, but you would not get LINQ to SQL specific functions, such as DataContext / designer / SQL Metal / Column / EntitySet / EntityRef and others.

+8
Oct 30 '08 at 16:26
source share

I know this question is old, but at this time I think we can find the official implementation of SQLite support for .NET here: http://system.data.sqlite.org/index.html/doc/trunk/www/ index.wiki . A good introductory article can be found here: http://www.codeproject.com/Articles/236918/Using-SQLite-embedded-database-with-entity-framewo

+4
Oct 14 '13 at 5:48 on
source share

This is not the answer to your question as such, but as an alternative, you can use SQL Compact:

http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx

Which has good LINQ-to-SQL support, and (despite the name) is great for desktop applications with low storage requirements.

+3
Oct 30 '08 at 14:36
source share

There the package on NuGet is called "LINQ to SQLite". I have not tried it, but it seems fresh.

https://www.nuget.org/packages/linq2db.SQLite/

+2
Jul 22 '15 at 0:37
source share

this is a good linq for sqlite ..

http://www.devart.com/dotconnect/sqlite/

+1
Aug 14 '09 at 9:46
source share

SqLite support has been improved with EntityFramework 7, and EntityFramework.Commands can be used to create some migrations. Here is a tutorial:

https://xamlbrewer.wordpress.com/2016/06/01/getting-started-with-sqlite-and-entity-framework-on-uwp/

As a prerequisite, you must install at least PowerShell3.

+1
Mar 22 '17 at 16:53 on
source share

Since DBLinq is no longer supported, I continued searching and found this answer that fuzzily points to a solution using Linq to Sql, Entity Framework, and SQLite. The blog post he is linking to is a bit outdated, but with some tweaks I got a working example up on GitHub.

It should start OOTB in Visual Studio 2013. It shows the addition of a record (with a related record to another table), changes and deletes. The Artist and Album classes represent entries in their respective tables (I assume this is part of the Entity Framework). See the Readme for a few fixes to keep in mind.

0
Jun 09 '15 at 0:34
source share



All Articles