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