A summary of the. NET C # call to SQLite

Source: Internet
Author: User

A summary of the. NET C # calls to SQLite

In the previous article I always wondered why I always reported some inexplicable errors when using multi-layered architectures, and wouldn't it be layered to use SQLite? Can you just write the UI, business logic, and data access all in one layer? Really can't layered development?

Holding the heart of not letter Xing, the next class back home and continue to study. After a toss and a little harvest, continue to share under!

My test code structure is as follows:

1, after testing whether your machine is x86 or x64, as long as to the SQLite website to download the corresponding. NET framework version of WIN32 version of it . I'm trying to refer to the same version of System.Data.Sqlite.dll as My own machine (x64). In addition, the platform target of each class library is modified to x86, but the following exception will eventually occur:

2, in addition, when you refer to the 32-bit System.Data.Sqlite.dll, you can not change the platform target of each project to x86. Note, however, that it is important to tick the prefer 32-bit of your main project or change the target to x86 for each goal platform, or else the exception will appear. Such as:

It is wrong to say at the end of the previous article that it is not possible to use SQLite to layer a project. It is possible to use it in a layered condition after testing it yourself.

For the use of SQLite summary of the temporary to this! All of these are summed up in practice and may be wrong in some places. If you have a friend to read and found that there is a non-positive point of welcome!

A summary of the. NET C # call to SQLite

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.