RepoDb.Sqlite.Turso
0.0.1-alpha1
Prefix Reserved
dotnet add package RepoDb.Sqlite.Turso --version 0.0.1-alpha1
NuGet\Install-Package RepoDb.Sqlite.Turso -Version 0.0.1-alpha1
<PackageReference Include="RepoDb.Sqlite.Turso" Version="0.0.1-alpha1" />
<PackageVersion Include="RepoDb.Sqlite.Turso" Version="0.0.1-alpha1" />
<PackageReference Include="RepoDb.Sqlite.Turso" />
paket add RepoDb.Sqlite.Turso --version 0.0.1-alpha1
#r "nuget: RepoDb.Sqlite.Turso, 0.0.1-alpha1"
#:package RepoDb.Sqlite.Turso@0.0.1-alpha1
#addin nuget:?package=RepoDb.Sqlite.Turso&version=0.0.1-alpha1&prerelease
#tool nuget:?package=RepoDb.Sqlite.Turso&version=0.0.1-alpha1&prerelease
<div align="center"> <a href="https://github.com/mikependon/RepoDB/tree/master/src/Providers/RepoDb.Sqlite.Turso"><image src="SQLite.png" style="width:256px;" /></a> <br/> <span style="font-size:28px;font-weight:bold;"><a href="https://github.com/mikependon/RepoDB/tree/master/src/Providers/RepoDb.Sqlite.Turso"><strong>RepoDb.Sqlite.Turso</strong></a></span> <br/> <span style="font-size:16px;">A high-performance data productivity platform for Turso (SQLite-compatible) in .NET.</span> </div>
<br/>
RepoDb.Sqlite.Turso — RepoDB for Turso (Turso.Data.Sqlite)
The Turso provider for RepoDB — a fast, lightweight .NET ORM that lets you use raw SQL and fluent operations side by side on the same connection. Built on top of RepoDb and Turso's .NET bindings (Turso.Data.Sqlite). Targets .NET 8, 9, and 10; .NET Standard is not supported by the underlying driver.
Important Pages
- GitHub Home — core library and source code.
- Website — full documentation, API reference, and blog.
Community
- GitHub Issues — bug reports and feature requests.
- Microsoft Teams — live Q&A.
- GitHub Discussions — ask questions and share ideas.
- X / Twitter — news and updates.
Dependencies
- Turso.Data.Sqlite.Provider — Turso data provider.
- RepoDb — the RepoDB core library.
License
Apache-2.0 — Copyright © 2019 Michael Camara Pendon, Marc-André Moreau
Installation
Install-Package RepoDb.Sqlite.Turso
Or visit the installation page for more options.
Get Started
Initialize the bootstrapper once at application startup:
GlobalConfiguration
.Setup(new()
{
ConversionType = RepoDb.Enumerations.ConversionType.Automatic
})
.UseTurso();
Then use any RepoDB operation directly on your SqliteConnection (using Turso.Data.Sqlite;). Data Source=:memory: creates a private in-memory database; keep the connection open while using it.
Query
using (var connection = new SqliteConnection(ConnectionString))
{
var customer = connection.Query<Customer>(c => c.Id == 10045);
}
Insert
var customer = new Customer
{
FirstName = "John",
LastName = "Doe",
IsActive = true
};
using (var connection = new SqliteConnection(ConnectionString))
{
var id = connection.Insert<Customer>(customer);
}
Update
using (var connection = new SqliteConnection(ConnectionString))
{
var customer = connection.Query<Customer>(10045);
customer.FirstName = "John";
customer.LastUpdatedUtc = DateTime.UtcNow;
var affectedRows = connection.Update<Customer>(customer);
}
Delete
using (var connection = new SqliteConnection(ConnectionString))
{
var customer = connection.Query<Customer>(10045);
var deletedCount = connection.Delete<Customer>(customer);
}
ExecuteQuery
using (var connection = new SqliteConnection(ConnectionString))
{
var customer = connection.ExecuteQuery<Customer>("SELECT * FROM [Customer] WHERE (Id = @Id);", new { Id = 10045 }).FirstOrDefault();
}
ExecuteNonQuery
using (var connection = new SqliteConnection(ConnectionString))
{
var affectedRows = connection.ExecuteNonQuery("UPDATE [Customer] SET FirstName = @FirstName WHERE (Id = @Id);", new { FirstName = "John", Id = 10045 });
}
ExecuteScalar
using (var connection = new SqliteConnection(ConnectionString))
{
var count = connection.ExecuteScalar<int>("SELECT COUNT(*) FROM [Customer];");
}
Visit the get-started page for the full SQLite guide; the same usage applies to Turso.
Compatibility
The provider retains SQLite SQL generation, parameter mapping, schema discovery, pagination, transactions, batched inserts, and RepoDB's insert/update-based merge behavior. There is no separate bulk-copy package.
Automatic conversion is recommended when entity types differ from the driver's
SQLite storage types (for example decimal, numeric, boolean, or date columns).
It is an explicit, process-wide RepoDB option; UseTurso() does not change it.
Truncate deletes rows without running VACUUM, which is experimental in the
Turso engine. It does not reclaim file space or reset an AUTOINCREMENT sequence.
Only Turso.Data.Sqlite.SqliteConnection is registered. The lower-level
Turso.TursoConnection is not interchangeable with the facade for this provider.
Provider-specific parameter attributes are in
RepoDb.Attributes.Parameter.Turso, avoiding conflicts with
RepoDb.Sqlite.Microsoft. Both packages can be referenced together; initialize
each with its own UseTurso() / UseSqlite() call.
Registration coexistence does not guarantee shared execution-cache compatibility.
Local benchmarking exposed an InsertAll parameter-setter cache collision when
the same entity type is used with both providers in one process: a Microsoft
SQLite parameter handler can be reused for a Turso parameter and throw
InvalidCastException. That mixed-provider scenario is not currently supported.
This provider includes a corresponding RepoDB core fix to resolve reader column types after reading the first row. When publishing packages, release the core from this revision as well; do not pin the provider to an older core package without that fix.
Turso is not a complete SQLite implementation: raw SQLite handles, built-in FTS modules, dirty reads, and remote client-side extension/function helpers have limitations documented upstream. Local async methods may use synchronous native execution. Remote/replica behavior requires an appropriate Turso endpoint and credentials; the copied integration suite runs locally without either.
License
Apache-2.0 — Copyright © 2026 Michael Camara Pendon and Marc-André Moreau
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- RepoDb (>= 1.17.0-beta1)
- Turso.Data.Sqlite.Provider (>= 0.8.1)
-
net8.0
- RepoDb (>= 1.17.0-beta1)
- Turso.Data.Sqlite.Provider (>= 0.8.1)
-
net9.0
- RepoDb (>= 1.17.0-beta1)
- Turso.Data.Sqlite.Provider (>= 0.8.1)
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 |
|---|---|---|
| 0.0.1-alpha1 | 25 | 10/8/2026 |