我有点喜欢从c#中使用SQLite。Net,但我似乎找不到合适的图书馆。有吗?官方的?除了使用包装器,还有其他方法使用SQLite吗?
当前回答
SQLite -net是一个开源的最小库,允许. net和Mono应用程序在SQLite 3数据库中存储数据。更多信息请访问维基页面。
它是用c#编写的,可以简单地编译到项目中。它最初是为iPhone上的MonoTouch设计的,但已经发展到可以在所有平台上工作(Mono for Android, . net, Silverlight, WP7, WinRT, Azure等)。
它是一个Nuget包,在那里它是第二大最受欢迎的SQLite包,截至2014年超过6万次下载。
Sqlite-net被设计成一个快速方便的数据库层。它的设计遵循以下目标:
Very easy to integrate with existing projects and with MonoTouch projects. Thin wrapper over SQLite and should be fast and efficient. (The library should not be the performance bottleneck of your queries.) Very simple methods for executing CRUD operations and queries safely (using parameters) and for retrieving the results of those query in a strongly typed fashion. Works with your data model without forcing you to change your classes. (Contains a small reflection-driven ORM layer.) 0 dependencies aside from a compiled form of the sqlite2 library.
非目标包括:
不是ADO。净的实现。这不是一个完整的SQLite驱动程序。如果需要,请使用System.Data.SQLite。
其他回答
SQLite -net是一个开源的最小库,允许. net和Mono应用程序在SQLite 3数据库中存储数据。更多信息请访问维基页面。
它是用c#编写的,可以简单地编译到项目中。它最初是为iPhone上的MonoTouch设计的,但已经发展到可以在所有平台上工作(Mono for Android, . net, Silverlight, WP7, WinRT, Azure等)。
它是一个Nuget包,在那里它是第二大最受欢迎的SQLite包,截至2014年超过6万次下载。
Sqlite-net被设计成一个快速方便的数据库层。它的设计遵循以下目标:
Very easy to integrate with existing projects and with MonoTouch projects. Thin wrapper over SQLite and should be fast and efficient. (The library should not be the performance bottleneck of your queries.) Very simple methods for executing CRUD operations and queries safely (using parameters) and for retrieving the results of those query in a strongly typed fashion. Works with your data model without forcing you to change your classes. (Contains a small reflection-driven ORM layer.) 0 dependencies aside from a compiled form of the sqlite2 library.
非目标包括:
不是ADO。净的实现。这不是一个完整的SQLite驱动程序。如果需要,请使用System.Data.SQLite。
Mono带有一个包装。https://github.com/mono/mono/tree/master/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0提供了以.net友好的方式包装实际SQLite dll (http://www.sqlite.org/sqlite-shell-win32-x86-3071300.zip在下载页面http://www.sqlite.org/download.html/上找到)的代码。它可以在Linux或Windows上运行。
这似乎是所有世界中最薄的,可以最大限度地减少对第三方库的依赖。如果我必须从头开始做这个项目,我就会这样做。
由sqlite库提供的函数的基本包装器。最新版本支持sqlite库3.7.10提供的函数
SQLiteWrapper项目
来自sqlite.org的人们已经接管了ADO的开发。净提供者:
在他们的主页上:
This is a fork of the popular ADO.NET 4.0 adaptor for SQLite known as System.Data.SQLite. The originator of System.Data.SQLite, Robert Simpson, is aware of this fork, has expressed his approval, and has commit privileges on the new Fossil repository. The SQLite development team intends to maintain System.Data.SQLite moving forward. Historical versions, as well as the original support forums, may still be found at http://sqlite.phxsoftware.com, though there have been no updates to this version since April of 2010.
完整的功能列表可以在他们的维基上找到。亮点包括
ADO。NET 2.0支持 完整的实体框架支持 完全支持Mono Visual Studio 2005/2008设计时支持 紧凑框架,C/ c++支持
已发布的dll可以直接从站点下载。
Microsoft.Data.Sqlite
微软现在提供Microsoft. data . SQLite作为。net的第一方SQLite解决方案,它是作为ASP. net的一部分提供的。净的核心。该许可证是Apache许可证,版本2.0。
NuGet包 在GitHub上的源回购
*免责声明:我自己还没有尝试过使用它,但是在微软文档中提供了一些关于。net Core和UWP使用它的文档。
推荐文章
- 在EF中更新父实体时如何添加/更新子实体
- ASP。NET身份的默认密码散列器-它是如何工作的,它是安全的?
- 如何从命令行在windows中找到mysql数据目录
- 如何写一个JSON文件在c# ?
- 如何找到MySQL的根密码
- 静态隐式运算符
- 不区分大小写列表搜索
- 'throw'和'throw new Exception()'的区别
- 不能在lambda表达式中使用ref或out参数
- c# int到字节[]
- 如何跟踪log4net问题
- 将WPF组合框绑定到自定义列表
- foreach vs somlist . foreach (){}
- 为什么try{…}最后{…}好;尝试{…} catch{}坏?
- c# 8用多种情况切换表达式,结果相同