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
                    
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="ArturRios.Data.Sqlite" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArturRios.Data.Sqlite" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ArturRios.Data.Sqlite" />
                    
Project file
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 ArturRios.Data.Sqlite --version 3.0.0
                    
#r "nuget: ArturRios.Data.Sqlite, 3.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 ArturRios.Data.Sqlite@3.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=ArturRios.Data.Sqlite&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ArturRios.Data.Sqlite&version=3.0.0
                    
Install as a Cake Tool

ArturRios.Data.Sqlite

NuGet Docs License: MIT

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

Licensed under the MIT License.

Product 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.

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
3.0.0 57 7/23/2026
2.0.0 75 7/23/2026
1.0.1 80 7/15/2026
1.0.0 81 7/15/2026