1, want to use Linqtosqlite to implement CRUD on database, development environment VS2013,
1.1 found the LINQ to DB T4 Models on the web, configure the Reference URL link: http://www.cnblogs.com/lxzhangying/p/3227110.html
Once configured, you can use LINQ statements to implement a lookup operation, based on object. But when you want to add, delete, modify, and want to use the Submit method inside LINQ to SQL Server, no solution is found.
1.2 Refer to this blog: Ready to use System.Data.SQLite, as well as dlinq. The former acts as SQL provider, the latter to provide LINQ. Unfortunately, LINQ inside the dlinq is not very useful.
Preparation information: DLinq get, https://github.com/DbLinq/dblinq2007 compile, and then in directory./build.dbg/Select DbLinq.dll DbLinq.Sqlite.dll System.Data.SQlite.dll DbMetal.exe
or download the connection here: Http://pan.baidu.com/s/1nu7KUxF
Then run: dbmetal.exe/database:mysqldb/schema/namespace=linqtosqlite/code=test.cs/provider=sqlite/conn= "Data source= D:\doc\my\data\code\LinqToSQLite\dlls\Test.db3 "
Test.cs is the resulting mapping code.
Refer to: http://www.cnblogs.com/walkingboy/archive/2009/10/27/linqtosqlite.html
Here are a few pits: 1. Dblinq is c#3 write, so System.Data.SQLite version is 2.0 otherwise will error. If your project is more than 4.0, and there is a pit,
Add this phrase to app.
<startup uselegacyv2runtimeactivationpolicy= "true" >
<supportedruntime version= "v4.0"/>
</startup>
2. Several DLLs mentioned above are added to the project.
Linq to SQLite by CRUD