TechIn.StatusPage.UI.Data 1.2.0

dotnet add package TechIn.StatusPage.UI.Data --version 1.2.0
                    
NuGet\Install-Package TechIn.StatusPage.UI.Data -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.Data" 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.Data" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="TechIn.StatusPage.UI.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 TechIn.StatusPage.UI.Data --version 1.2.0
                    
#r "nuget: TechIn.StatusPage.UI.Data, 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.Data@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.Data&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=TechIn.StatusPage.UI.Data&version=1.2.0
                    
Install as a Cake Tool

TechIn.StatusPage.UI.Data

Shared data layer for TechIn.StatusPage storage providers. Contains the EF Core DbContext, entity configurations, and the common EfCoreStatusRepository used by database-backed providers.

Note: This package is a dependency of the storage provider packages. You typically don't need to install it directly — it's pulled in automatically when you add a provider like TechIn.StatusPage.UI.Storage.PostgreSQL.

Installation

dotnet add package TechIn.StatusPage.UI.Data

What's Inside

Component Description
StatusPageDbContext EF Core DbContext with DbSet<HealthSnapshot>
HealthSnapshotConfiguration Entity configuration with snake_case column names and indexes
EfCoreStatusRepository Shared IStatusRepository implementation for relational databases
DatabaseMigrationHostedService<TContext> Generic hosted service that applies EF Core migrations at startup

Schema

The HealthSnapshotConfiguration defines the following table structure:

snapshots
├── id              bigint (PK, auto-increment)
├── service_name    varchar(256)
├── status          varchar(32)     — Operational, Degraded, Down
├── timestamp       datetimeoffset
├── latency         nullable
└── description     varchar(2048), nullable

Indexes

  • ix_snapshots_service_name
  • ix_snapshots_service_name_timestamp
  • ix_snapshots_timestamp

Schema Prefix

PostgreSQL and SQL Server providers use the status_page schema. Providers that don't support schemas (MySQL, SQLite) store tables without a prefix — this is handled automatically in StatusPageDbContext.OnModelCreating.

Building a Custom Storage Provider

If you're building your own storage provider package, reference this package and use the shared components:

using TechIn.StatusPage.UI.Data;

public static class MyProviderExtensions
{
    public static StatusPageBuilder AddMyProvider(
        this StatusPageBuilder builder,
        string connectionString)
    {
        // Register DbContextFactory with your provider
        builder.Services.AddDbContextFactory<StatusPageDbContext>(options =>
            options.UseYourProvider(connectionString, opt =>
                opt.MigrationsAssembly(typeof(MyProviderExtensions).Assembly.FullName)));

        // Use the shared EfCoreStatusRepository or your own
        builder.Services.AddHostedService<DatabaseMigrationHostedService<StatusPageDbContext>>();
        builder.UseStatusRepository<EfCoreStatusRepository>(ServiceLifetime.Scoped);
        return builder;
    }
}

If your provider has LINQ translation limitations (like SQLite with DateTimeOffset), implement a custom IStatusRepository instead of using EfCoreStatusRepository.

Requirements

  • .NET 8.0, 9.0, or 10.0

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 (3)

Showing the top 3 NuGet packages that depend on TechIn.StatusPage.UI.Data:

Package Downloads
TechIn.StatusPage.UI.Storage.MySQL

TechIn.StatusPage.UI.Storage.MySQL package containing MySQL database context definition

TechIn.StatusPage.UI.Storage.PostgreSQL

TechIn.StatusPage.UI.Storage.PostgreSQL package containing PostgreSQL database context definition

TechIn.StatusPage.UI.Storage.SQLite

TechIn.StatusPage.UI.Storage.SQLite package containing SQLite database context definition

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 161 2/25/2026