Rask.SQLite.EntityFrameworkCore 0.18.1-alpha.0.8

This is a prerelease version of Rask.SQLite.EntityFrameworkCore.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Rask.SQLite.EntityFrameworkCore --version 0.18.1-alpha.0.8
                    
NuGet\Install-Package Rask.SQLite.EntityFrameworkCore -Version 0.18.1-alpha.0.8
                    
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="Rask.SQLite.EntityFrameworkCore" Version="0.18.1-alpha.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.SQLite.EntityFrameworkCore" Version="0.18.1-alpha.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Rask.SQLite.EntityFrameworkCore" />
                    
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 Rask.SQLite.EntityFrameworkCore --version 0.18.1-alpha.0.8
                    
#r "nuget: Rask.SQLite.EntityFrameworkCore, 0.18.1-alpha.0.8"
                    
#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 Rask.SQLite.EntityFrameworkCore@0.18.1-alpha.0.8
                    
#: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=Rask.SQLite.EntityFrameworkCore&version=0.18.1-alpha.0.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rask.SQLite.EntityFrameworkCore&version=0.18.1-alpha.0.8&prerelease
                    
Install as a Cake Tool

Rask.SQLite.EntityFrameworkCore

The Entity Framework Core integration for Rask.SQLite. UseRaskSqlite(...) is a drop-in replacement for UseSqlite that also wires a ConnectionOpened interceptor applying the Rails-style production pragma set — WAL, synchronous=NORMAL, foreign_keys=ON, a busy_timeout, mmap_size, journal_size_limit — to every connection the context opens.

Split out from Rask.SQLite so apps that only use the raw Microsoft.Data.Sqlite path (or run on mobile / under AOT, where you don't want EF Core) can stay lean.

Install

dotnet add package Rask.SQLite.EntityFrameworkCore

Use

builder.Services.AddDbContextFactory<AppDb>(o =>
    o.UseRaskSqlite($"Data Source={dbPath}"));

Override any pragma via the optional configure delegate:

o.UseRaskSqlite($"Data Source={dbPath}", p =>
{
    p.BusyTimeout = TimeSpan.FromSeconds(10);
    p.CacheSize = -20_000;   // negative ⇒ KiB, so 20 MB
});

Busy-retry for SaveChanges

Pass configureRetry (even empty) to register a Rails-style fair-interval execution strategy so SaveChanges/queries retry on SQLITE_BUSY/SQLITE_LOCKED at a constant 1 ms interval, awaiting (not blocking) between attempts:

o.UseRaskSqlite($"Data Source={dbPath}", configureRetry: _ => { });

The truly non-blocking, BEGIN IMMEDIATE write path lives in Rask.SQLite (ExecuteInImmediateTransactionAsync); see the docs for when to reach for it.

Not using EF Core? Use Rask.SQLite directly: services.AddRaskSqlite(cs) + inject IRaskSqliteConnectionFactory.

Full documentation: https://github.com/pal-tamas/rask/blob/main/docs/sqlite.md

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
0.18.1-alpha.0.22 0 7/16/2026
0.18.1-alpha.0.21 0 7/16/2026
0.18.1-alpha.0.19 0 7/16/2026
0.18.1-alpha.0.15 0 7/16/2026
0.18.1-alpha.0.13 0 7/16/2026
0.18.1-alpha.0.12 0 7/16/2026
0.18.1-alpha.0.10 0 7/16/2026
0.18.1-alpha.0.9 0 7/16/2026
0.18.1-alpha.0.8 0 7/16/2026
0.18.1-alpha.0.7 0 7/16/2026
0.18.1-alpha.0.1 0 7/16/2026
0.18.0 0 7/16/2026
0.17.1-alpha.0.41 0 7/16/2026
0.17.1-alpha.0.39 0 7/16/2026
0.17.1-alpha.0.38 0 7/16/2026
0.17.1-alpha.0.36 0 7/16/2026
0.17.1-alpha.0.35 6 7/16/2026
0.17.1-alpha.0.34 6 7/16/2026
0.17.1-alpha.0.33 5 7/16/2026
0.17.1-alpha.0.32 5 7/16/2026
Loading failed