Sparkdo.EntityFrameworkCore.Sqlite
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Sparkdo.EntityFrameworkCore.Sqlite --version 1.0.0
NuGet\Install-Package Sparkdo.EntityFrameworkCore.Sqlite -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sparkdo.EntityFrameworkCore.Sqlite" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.EntityFrameworkCore.Sqlite" Version="1.0.0" />
<PackageReference Include="Sparkdo.EntityFrameworkCore.Sqlite" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sparkdo.EntityFrameworkCore.Sqlite --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sparkdo.EntityFrameworkCore.Sqlite, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sparkdo.EntityFrameworkCore.Sqlite@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sparkdo.EntityFrameworkCore.Sqlite&version=1.0.0
#tool nuget:?package=Sparkdo.EntityFrameworkCore.Sqlite&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sparkdo.EntityFrameworkCore.Sqlite
Sparkdo Entity Framework Core SQLite 集成库,提供与 SQLite 数据库的深度集成支持。
功能特性
- SQLite 数据库上下文配置扩展
- 线程安全的 SQLite 命令执行
- 单元测试专用的 SQLite 连接实现
- 与 Sparkdo 框架无缝集成
安装
<PackageReference Include="Sparkdo.EntityFrameworkCore.Sqlite" Version="x.x.x" />
核心组件
SparkdoDbContextConfigurationContextSqliteExtensions
SQLite 数据库上下文配置扩展类,提供便捷的 SQLite 配置方法:
UseSqlite(): 配置使用 SQLite 数据库,支持连接字符串和现有连接对象
SparkdoDbContextOptionsSqliteExtensions
SQLite 数据库上下文选项扩展类,提供便捷的 SQLite 选项配置方法:
UseSqlite(): 配置使用 SQLite 数据库,支持泛型上下文类型
SparkdoEntityFrameworkCoreSqliteModule
Sparkdo Entity Framework Core SQLite 模块,负责注册 SQLite 相关的服务和配置:
- 配置 EF Core 全局过滤器选项,启用数据库函数支持
SparkdoSqliteCommand
线程安全的 SQLite 命令实现,通过信号量确保 SQLite 命令执行的线程安全性:
- 重写 Connection 属性,确保连接设置的线程安全
- 重写 Dispose 方法,确保资源释放的线程安全
SparkdoUnitTestSqliteConnection
单元测试专用的 SQLite 连接实现,解决 SQLite 在并发测试中的线程安全问题:
- 继承自 SqliteConnection,提供线程安全的命令创建
- 返回线程安全的 SparkdoSqliteCommand 实例
扩展性
该库提供了完整的 SQLite 集成功能实现,可以通过以下方式扩展:
- 实现自定义的数据库配置扩展方法
- 实现自定义的 SQLite 命令执行逻辑
- 实现自定义的连接管理策略
代码结构说明
本项目包含以下主要组件:
数据库配置扩展
SparkdoDbContextConfigurationContextSqliteExtensions: 数据库上下文配置扩展SparkdoDbContextOptionsSqliteExtensions: 数据库上下文选项扩展
模块配置
SparkdoEntityFrameworkCoreSqliteModule: SQLite 模块配置
线程安全实现
SparkdoSqliteCommand: 线程安全的 SQLite 命令SparkdoUnitTestSqliteConnection: 单元测试专用 SQLite 连接
所有公共接口和类都添加了详细的 XML 文档注释,便于开发者理解和使用。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- JetBrains.Annotations (>= 2025.2.2)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.0)
- Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Json (>= 10.0.0)
- Microsoft.Extensions.Configuration.UserSecrets (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyModel (>= 10.0.0)
- Microsoft.Extensions.FileProviders.Composite (>= 10.0.0)
- Microsoft.Extensions.FileProviders.Embedded (>= 10.0.0)
- Microsoft.Extensions.FileProviders.Physical (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Localization (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Nito.AsyncEx.Context (>= 5.1.2)
- Sparkdo.EntityFrameworkCore (>= 1.0.0)
- System.Linq.Dynamic.Core (>= 1.7.0)
- TimeZoneConverter (>= 7.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2-preview.1 | 133 | 12/4/2025 |
| 1.0.1 | 176 | 11/27/2025 |
| 1.0.0 | 183 | 11/25/2025 |
| 1.0.0-preview.5 | 87 | 10/24/2025 |