Would someone explain how to get LINQ working with Sqlite.
Check this provider:
Also you can consider using SQL Compact which has very good LINQ-to-SQL support.
Yup there is a SqlLite Linq Provider as mentioned by CMS
Check out SQL server compact and it works well with Linq
I would like to add that you can use Linq to Sql with SqlLite with a couple of stipulations:
- You cannot use the Linq to Sql designer which means you have to hand roll your classes.
- You have to be careful not to do certain operation which will result in Sql code which is not supported by SqlLite.
For example, you cannot use FirstOrDefault() in any of your Linq queries because it will result in something like:
select top 1 * from table where ...
Since SqlLite doesn't support the "top 1" syntax, you will gt a runtime Sql error.
Other than that, I have been using Linq to Sql with SqlLite with great success for basic CRUD operations.
The link provided by CMS doesn't work anymore. I have used this one as it now seems to be baked into their SQL lite ADO .NET provider.
Unfortunately they still don't support the designer mode of VS for creating classes :(
Also be aware that SQL Server compact doesn't support the design mode for LINQ classes! However if you want to use the entity framework the designer does work for SQL lite and SQL Server compact :)
On this time there is NO good tools to do this!
LINQ providers for SQLite all is in alpha stage (for example:dblinq2007). And it is very big risk to use it in commercial purpose! So maybe in future...
If you want ot use ADO.NET there is good ove: phxsoftware.
Joe Albahari's LINQPad now supports Sqlite: http://www.linqpad.net/Beta.aspx. The one LINQ tool to rule them all.
You can use this: http://code.google.com/p/dblinq2007. Although it looks like the project is still in Alpha stage, IMO it is actually very stable now. Of course if you have a huge project, it is better to consider using something else like MySQL or SQL Compact. I don't like SQL Server, because it is too bloated, and offers not many more functionalities over SQL Compact or MySQL