How to Use SQLite in. net

Source: Internet
Author: User

The http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki of system. Data. SQLite

Generally, use. NET system will use Microsoft SQL Server, because the combination of the two is the best, the reason does not need to be said, in. net Framework 3.5 and later, all of them provide LINQ to SQL, which is a very easy-to-use orm and is sufficient for general projects. However, it seems that only Microsoft's own Microsoft SQL Server (including compact and express) supports LINQ to SQL, because Microsoft provides its own LINQ provider to operate Microsoft SQL Server. For third-party databases, i'm afraid I'm not so lucky. For example, SQLite, If you create a dbml and try to drag the SQLite table into it, this error will occur:

Although there are some alternatives after a large amount of information is found, there are still many problems. After all, SQLite and Microsoft SQL Server differ too far. What is the ability to understand LINQ? This is a problem. In addition, some of the features of SQLite itself cannot be well reflected by LINQ, so the most correct way is to discard "LINQ to SQLite ".

If you insist on use can refer to: http://code.google.com/p/dblinq2007/

But I won't do it that way. I guess it's easy not to go anywhere, and there are some potential errors ...... However, you may have noticed that there is a "system. Data. SQLite. LINQ. dll" file in the installation directory of system. Data. SQLite? Isn't this the official "LINQ to SQLite? -- Actually not. This is used for LINQ to entity. It is said that it is not easy to use ......

Small projects generally do not like tossing, so we should be honest and practical, and add ourselves to write SQL statements, straightforward.

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.