What is the best way to connect and use a sqlite database from C#

前端 未结 9 974
执笔经年
执笔经年 2020-11-29 19:24

I\'ve done this before in C++ by including sqlite.h but is there a similarly easy way in C#?

9条回答
  •  抹茶落季
    2020-11-29 19:58

    Mono comes with a wrapper, use theirs!

    https://github.com/mono/mono/tree/master/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0 gives code to wrap the actual SQLite dll ( http://www.sqlite.org/sqlite-shell-win32-x86-3071300.zip found on the download page http://www.sqlite.org/download.html/ ) in a .net friendly way. It works on Linux or Windows.

    This seems the thinnest of all worlds, minimizing your dependence on third party libraries. If I had to do this project from scratch, this is the way I would do it.

提交回复
热议问题