LINQ2DB SQLite Application

Source: Internet
Author: User
Tags sqlite

When using Linq2db SQLite, it was not found to add, delete the operation that was originally to introduce a new namespace Linqtodb.

1 using Linqtodb;

Insert:

1             User Unew = New user (), 2             unew.name = "Test", 3             Unew.password = "one"; 4             db. Insert (unew);

Update:

1  using (var db = new Databasehelper1db (@ "Data source=f:\yun\volcanocloudtest\databasehelper2.db3; version=3; Password=1 ")) 2             {3                 db. USERS4                   . Where (U = u.id = = 1) 5                   . Set (p = = p.name, "test") 6                   . Update (); 7             }

Delete:

1             using (var db = new Databasehelper1db (@ "Data source=f:\yun\volcanocloudtest\databasehelper2.db3; version=3; Password=1 ")) 2             {3                 db. USERS4                   . Where (U = u.id = = 1) 5                   . Delete (); 6             }

  

In addition, LINQTODB also support access (see a lot of comrades looking for LINQ to access, some people also use charges, which may be the Gospel) and so on more than 10 databases, using similar methods, this article has been very long (I like short articles, easy to read), so not to repeat, If you want to use the comrades, do it yourself.

End

This article is my first in the Garden (debut), I hope you can correct me, if I could help you, I said Gray often happy. January 6, 2015 at the library.

LINQ2DB SQLite Application

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.