我有点喜欢从c#中使用SQLite。Net,但我似乎找不到合适的图书馆。有吗?官方的?除了使用包装器,还有其他方法使用SQLite吗?
当前回答
现在还有这个选项:http://code.google.com/p/csharp-sqlite/ -一个完整的SQLite到c#的移植。
其他回答
http://www.devart.com/dotconnect/sqlite/
dotConnect for SQLite是一个基于ADO的增强的SQLite数据提供程序。NET技术为开发基于sqlite的数据库应用程序提供了一个完整的解决方案。作为Devart数据库应用程序开发框架的一部分,dotConnect for SQLite既提供了到SQLite数据库的高性能本机连接,也提供了许多创新的开发工具和技术。
SQLite的dotConnect引入了设计应用程序架构的新方法,提高了工作效率,并利用了数据库应用程序实现。
我使用标准版本,它工作完美:)
对于那些像我一样不需要或不想要ADO的人。NET,那些需要运行更接近SQLite的代码,但仍然兼容netstandard (. NET framework, . NET core等)的人,我已经建立了一个100%免费的开源项目,名为SQLNado(“非ADO”),可在github:
https://github.com/smourier/SQLNado
它可以作为一个nuget在这里https://www.nuget.org/packages/SqlNado,但也可以作为一个单独的。cs文件,所以在任何c#项目类型中使用它都非常实用。
当使用SQL命令时,它支持所有SQLite特性,并且通过.NET也支持大多数SQLite特性:
Automatic class-to-table mapping (Save, Delete, Load, LoadAll, LoadByPrimaryKey, LoadByForeignKey, etc.) Automatic synchronization of schema (tables, columns) between classes and existing table Designed for thread-safe operations Where and OrderBy LINQ/IQueryable .NET expressions are supported (work is still in progress in this area), also with collation support SQLite database schema (tables, columns, etc.) exposed to .NET SQLite custom functions can be written in .NET SQLite incremental BLOB I/O is exposed as a .NET Stream to avoid high memory consumption SQLite collation support, including the possibility to add custom collations using .NET code SQLite extensions (.dll) loading support SQLite Full Text Search engine (FTS3) support, including the possibility to add custom FTS3 tokenizers using .NET code (like localized stop words for example). I don't believe any other .NET wrappers do that. Automatic support for Windows 'winsqlite3.dll' (only on recent Windows versions) to avoid shipping any binary dependency file. This works in Azure Web apps too!.
现在还有这个选项:http://code.google.com/p/csharp-sqlite/ -一个完整的SQLite到c#的移植。
我肯定会选择System.Data.SQLite(如前所述:http://sqlite.phxsoftware.com/)
它与ADO是一致的。NET (System.Data.*),并被编译成单个DLL。没有sqlite3.dll -因为SQLite的C代码嵌入在System.Data.SQLite.dll中。一点托管的c++魔法。
Microsoft.Data.Sqlite
微软现在提供Microsoft. data . SQLite作为。net的第一方SQLite解决方案,它是作为ASP. net的一部分提供的。净的核心。该许可证是Apache许可证,版本2.0。
NuGet包 在GitHub上的源回购
*免责声明:我自己还没有尝试过使用它,但是在微软文档中提供了一些关于。net Core和UWP使用它的文档。
推荐文章
- 实体框架核心:在上一个操作完成之前,在此上下文中开始的第二个操作
- 如何为构造函数定制Visual Studio的私有字段生成快捷方式?
- 为什么Visual Studio 2015/2017/2019测试运行器没有发现我的xUnit v2测试
- 如何使用JSON确保字符串是有效的JSON。网
- AppSettings从.config文件中获取值
- 通过HttpClient向REST API发布一个空体
- 获得PostgreSQL数据库中当前连接数的正确查询
- 如何检查IEnumerable是否为空或空?
- MySQL数据库表中的最大记录数
- 自动化invokerrequired代码模式
- 没有ListBox。SelectionMode="None",是否有其他方法禁用列表框中的选择?
- 在c#代码中设置WPF文本框的背景颜色
- 在c#中,什么是单子?
- 从现有模式生成表关系图(SQL Server)
- c#和Java中的泛型有什么不同?和模板在c++ ?