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
<PackageReference Include="TechIn.StatusPage.UI.Data" Version="1.2.0" />
<PackageVersion Include="TechIn.StatusPage.UI.Data" Version="1.2.0" />
<PackageReference Include="TechIn.StatusPage.UI.Data" />
paket add TechIn.StatusPage.UI.Data --version 1.2.0
#r "nuget: TechIn.StatusPage.UI.Data, 1.2.0"
#:package TechIn.StatusPage.UI.Data@1.2.0
#addin nuget:?package=TechIn.StatusPage.UI.Data&version=1.2.0
#tool nuget:?package=TechIn.StatusPage.UI.Data&version=1.2.0
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_nameix_snapshots_service_name_timestampix_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 | 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
- Microsoft.EntityFrameworkCore (>= 10.0.3)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.3)
- TechIn.StatusPage.Core (>= 1.2.0)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.11)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.11)
- TechIn.StatusPage.Core (>= 1.2.0)
-
net9.0
- Microsoft.EntityFrameworkCore (>= 9.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.0)
- TechIn.StatusPage.Core (>= 1.2.0)
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 |