ArturRios.Data.Sqlite
3.0.0
dotnet add package ArturRios.Data.Sqlite --version 3.0.0
NuGet\Install-Package ArturRios.Data.Sqlite -Version 3.0.0
<PackageReference Include="ArturRios.Data.Sqlite" Version="3.0.0" />
<PackageVersion Include="ArturRios.Data.Sqlite" Version="3.0.0" />
<PackageReference Include="ArturRios.Data.Sqlite" />
paket add ArturRios.Data.Sqlite --version 3.0.0
#r "nuget: ArturRios.Data.Sqlite, 3.0.0"
#:package ArturRios.Data.Sqlite@3.0.0
#addin nuget:?package=ArturRios.Data.Sqlite&version=3.0.0
#tool nuget:?package=ArturRios.Data.Sqlite&version=3.0.0
ArturRios.Data.Sqlite
The SQLite provider for the ArturRios.Data toolkit. It plugs SQLite into
ArturRios.Data.Relational.Core
via a single IDatabaseProvider registration — your entities, repositories, and unit of work stay
exactly the same as with any other engine.
This package is a thin provider. All the repository and transaction surface lives in
ArturRios.Data.Relational.Core, which you install alongside it.
Installation
dotnet add package ArturRios.Data.Relational.Core
dotnet add package ArturRios.Data.Sqlite
Requires .NET 10.0 or later.
Quick start
1. Configure (appsettings.json, default section "ArturRios.Data.Core"):
{
"ArturRios.Data.Core": {
"DatabaseType": "SqLite",
"ConnectionString": "Data Source=app.db"
}
}
Note the DatabaseType spelling: SqLite.
2. Register the provider before the data layer (Program.cs):
using ArturRios.Data.Sqlite; // brings AddSqliteProvider()
using ArturRios.Data.Relational.Core.DependencyInjection;
builder.Services.AddSqliteProvider();
builder.Services.AddDataConfigFromSettings<AppDbContext>(builder.Configuration, "ArturRios.Data.Core");
That's the whole provider-specific surface. From here on you use IAsyncRepository<T>,
IAsyncUnitOfWork, and the rest of the core API — see the
Relational guide.
What it does
AddSqliteProvider() registers SqliteProvider as a singleton IDatabaseProvider with
Type => DatabaseType.SqLite. When AddDataConfigFromSettings<TContext> builds your context and the configured
DatabaseType is SqLite, this provider is selected and calls UseSqlite(connectionString).
If the configured DatabaseType has no matching provider registered, registration fails fast with a
DataAccessException naming the missing provider.
In-memory SQLite for tests
SQLite's in-memory mode is a common fit for integration tests. Keep a connection open for the lifetime of the database, since it is dropped when the last connection closes:
{
"ArturRios.Data.Core": {
"DatabaseType": "SqLite",
"ConnectionString": "Data Source=:memory:;Cache=Shared"
}
}
Documentation
- 📚 Full documentation: https://artur-rios.github.io/dotnet-data
- 🗄️ Relational guide: https://artur-rios.github.io/dotnet-data/relational/
- 🧩 Architecture & diagrams: https://artur-rios.github.io/dotnet-data/architecture/
Legal
Licensed under the MIT License.
| 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. |
-
net10.0
- ArturRios.Data.Relational.Core (>= 3.0.0)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 2.1.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.