TechIn.StatusPage.UI.Storage.SQLite 1.2.0

dotnet add package TechIn.StatusPage.UI.Storage.SQLite --version 1.2.0
                    
NuGet\Install-Package TechIn.StatusPage.UI.Storage.SQLite -Version 1.2.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="TechIn.StatusPage.UI.Storage.SQLite" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TechIn.StatusPage.UI.Storage.SQLite" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="TechIn.StatusPage.UI.Storage.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 TechIn.StatusPage.UI.Storage.SQLite --version 1.2.0
                    
#r "nuget: TechIn.StatusPage.UI.Storage.SQLite, 1.2.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 TechIn.StatusPage.UI.Storage.SQLite@1.2.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=TechIn.StatusPage.UI.Storage.SQLite&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=TechIn.StatusPage.UI.Storage.SQLite&version=1.2.0
                    
Install as a Cake Tool

TechIn.StatusPage.UI.Storage.Sqlite

SQLite storage provider for TechIn.StatusPage. Persists health-check snapshots to a local SQLite database using Entity Framework Core. Ideal for single-instance deployments, small projects, and local development.

Installation

dotnet add package TechIn.StatusPage.UI.Storage.Sqlite

Usage

builder.Services
    .AddStatusPage(o => o.HistoryRetentionDays = 90)
    .AddSqliteStorage("Data Source=statuspage.db");

That's it. The provider will automatically apply EF Core migrations on startup and begin persisting snapshots. The database file is created automatically if it doesn't exist.

Connection String

{
  "ConnectionStrings": {
    "StatusPage": "Data Source=statuspage.db"
  }
}

Or use an absolute path:

{
  "ConnectionStrings": {
    "StatusPage": "Data Source=/var/data/statuspage.db"
  }
}

The default connection string when none is provided is Data Source=statuspage.db.

What It Registers

Service Lifetime Description
IDbContextFactory<StatusPageDbContext> Singleton Configured with Microsoft.EntityFrameworkCore.Sqlite
IStatusRepository Scoped SQLite-optimized implementation with client-side evaluation for DateTimeOffset operations
DatabaseMigrationHostedService Hosted Applies pending migrations at startup

Database Schema

snapshots
├── id              integer (PK, autoincrement)
├── service_name    text
├── status          text            — Operational, Degraded, Down
├── timestamp       text            — ISO 8601 format
├── latency         text            — nullable
└── description     text            — nullable

Indexes

  • ix_snapshots_service_name — filter by service
  • ix_snapshots_service_name_timestamp — date-range queries per service
  • ix_snapshots_timestamp — purge operations

Manual Migration

If you prefer not to run migrations automatically, you can apply them via CLI:

dotnet ef database update \
  --project src/TechIn.StatusPage.UI.Storage.Sqlite \
  --framework net8.0

SQLite Considerations

  • Single-writer: SQLite allows only one write at a time. This is fine for typical status page workloads (one write per poll cycle), but not suitable for high-concurrency scenarios.
  • DateTimeOffset: SQLite stores DateTimeOffset as ISO 8601 text. Some LINQ operations (comparisons, ordering) are evaluated client-side to ensure correctness.
  • File-based: The database is a single file on disk. Back it up by copying the file. No server process required.
  • No schema support: Tables are created without a schema prefix.

Requirements

  • .NET 8.0, 9.0, or 10.0

Custom Repository

If you need a different storage backend, implement IStatusRepository and register it:

builder.Services
    .AddStatusPage()
    .UseStatusRepository<YourCustomRepository>(ServiceLifetime.Scoped);

License

MIT — see LICENSE for details.

Product 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. 
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
1.2.0 109 2/25/2026