EfTurso.Data 0.0.1-alpha

This is a prerelease version of EfTurso.Data.
dotnet add package EfTurso.Data --version 0.0.1-alpha
                    
NuGet\Install-Package EfTurso.Data -Version 0.0.1-alpha
                    
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="EfTurso.Data" Version="0.0.1-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EfTurso.Data" Version="0.0.1-alpha" />
                    
Directory.Packages.props
<PackageReference Include="EfTurso.Data" />
                    
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 EfTurso.Data --version 0.0.1-alpha
                    
#r "nuget: EfTurso.Data, 0.0.1-alpha"
                    
#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 EfTurso.Data@0.0.1-alpha
                    
#: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=EfTurso.Data&version=0.0.1-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EfTurso.Data&version=0.0.1-alpha&prerelease
                    
Install as a Cake Tool

<div align="center">

<img src="assets/icon.png" alt="EfTurso" width="96" />

EfTurso

Entity Framework Core 10 provider for Turso / libSQL. Write LINQ, not HTTP.

NuGet Version NuGet Downloads CI License: MIT

Keep using DbContext, Include, Where and migrations exactly as you know them. Under the hood, the provider talks to Turso Cloud over the Hrana protocol.

Alpha: this is an early alpha release (0.0.1-alpha). The API may change and it is not recommended for production yet. Feedback and bug reports are very welcome.

Disclaimer: community project, not officially affiliated with Turso. Built independently on the public Hrana protocol spec and the libSQL ecosystem.

</div>


Why this provider

  • Familiar. Your existing EF Core code, LINQ queries and migrations work as they do with any other provider.
  • Light. No native binaries to ship for the connection: everything goes over HTTPS to your Turso database.
  • Reliable by construction. LINQ translation, type mapping and migration SQL are inherited from the Sqlite provider, so they are the same battle-tested code paths. Only the connection layer is new.
  • Honest. When a construct can't be translated for Turso, you get a clear exception, not silently wrong SQL.

Contents

Installation

dotnet add package EfTurso

Quick Start

using Microsoft.EntityFrameworkCore;
using EfTurso;

var optionsBuilder = new DbContextOptionsBuilder<BlogDbContext>();
optionsBuilder.UseTurso("Server=https://<database>-<organization>.turso.io;Token=<auth-token>");

using var db = new BlogDbContext(optionsBuilder.Options);
await db.Database.EnsureCreatedAsync();

var user = await db.Users
    .Include(u => u.UserDetail)
    .FirstOrDefaultAsync(u => u.Id == 1);

Console.WriteLine(user?.Name ?? "Not found");

public class BlogDbContext : DbContext
{
    public BlogDbContext(DbContextOptions<BlogDbContext> options) : base(options) { }
    public DbSet<User> Users => Set<User>();

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<User>(entity =>
        {
            entity.HasKey(e => e.Id);
            entity.HasOne(e => e.UserDetail)
                  .WithOne(e => e.User)
                  .HasForeignKey<UserDetail>(e => e.UserId);
        });
    }
}

Requirements

  • .NET 10
  • Entity Framework Core 10 (10.0.x). This is the only supported EF Core major version for now; the provider relies on a few EF Core internals that can change between major versions.
  • A Turso Cloud database and its auth token

Environment: this project targets Turso Cloud only. A local sqld/Docker workflow is not available yet (tracked in #2). The functional and conformance tests run against a real Turso Cloud database via test/protocol/run-cloud-tests.ps1, which reads credentials from test/protocol/.env and never leaves them set in your shell.

Architecture

This provider takes advantage of the ~99% SQL compatibility between libSQL and SQLite. Instead of reinventing LINQ translation, type mapping and migrations SQL generation, it inherits those layers from Microsoft.EntityFrameworkCore.Sqlite and replaces only the connection/protocol layer via the Hrana protocol over HTTP.

Layer Source
LINQ → SQL translation Inherited from Sqlite
Type mapping Inherited from Sqlite
SQL generation & migrations Inherited from Sqlite
Connection / protocol EfTurso.Data (Hrana over HTTP)
EF Core integration EfTurso

Project Structure

/src
  EfTurso.Data/                        # ADO.NET layer (System.Data.Common)
  EfTurso/          # EF Core provider
/test
  EfTurso.Data.Tests/
  EfTurso.Tests/
  EfTurso.FunctionalTests/

Branch Flow

  • master: production/stable, the default branch.
  • rc/alpha: release candidate (alpha line).
  • dev: integration and development. New work lands here first.

Flow: dev → rc/alpha → master.

Resources

Contributing

Issues and pull requests are welcome. Please read CONTRIBUTING.md first: it covers the technical scope and the contribution workflow.

License

MIT. See 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.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EfTurso.Data:

Package Downloads
EfTurso

Entity Framework Core 10 provider for Turso/libSQL. Leverages the Hrana protocol via EfTurso.Data and inherits LINQ translation from Microsoft.EntityFrameworkCore.Sqlite.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-alpha 45 10/15/2026