Kritikos.Configuration.Persistence.Contracts
2.1.0
dotnet add package Kritikos.Configuration.Persistence.Contracts --version 2.1.0
NuGet\Install-Package Kritikos.Configuration.Persistence.Contracts -Version 2.1.0
<PackageReference Include="Kritikos.Configuration.Persistence.Contracts" Version="2.1.0" />
paket add Kritikos.Configuration.Persistence.Contracts --version 2.1.0
#r "nuget: Kritikos.Configuration.Persistence.Contracts, 2.1.0"
// Install Kritikos.Configuration.Persistence.Contracts as a Cake Addin #addin nuget:?package=Kritikos.Configuration.Persistence.Contracts&version=2.1.0 // Install Kritikos.Configuration.Persistence.Contracts as a Cake Tool #tool nuget:?package=Kritikos.Configuration.Persistence.Contracts&version=2.1.0
Configuration.Persistence
Starting point and useful extensions to handle database persistence via Entity Framework Core.
Persistence Abstractions
IEntity<TKey>
marks and groups primary entities in project having a primary key of typeTKey
IConcurrent
provides RowVersion used by Microsoft SQL Server for database concurrencyITimestamped
andIAuditable<T>
handle audit records and are compatible with provided interceptors
Examples can be found in BasicEntity
, ConcurrentEntity
and Entity
.
Interceptors
A set of pre-transaction interceptors that provide helper functions. Current list includes:
AuditSaveChangesInterceptor
: provides auditing for create/update events, requires an implementation ofIAuditorProvider
in order to workITimeStampSaveChangesInterceptor
: populates fields provided byITimestamped
, auditing create and update dates of each recordReadOnlyDbCommandInterceptor
: turns a database readonly by supressing all actions in SaveChanges
Services
MigrationService<TContext>
is an oneshotHostedService
that enforces database migration before kestrel starts serving requests.
Extensions
Please refrain from using ChangeTracker extensions, they are considered obsolete and will be removed at some point in the future.
EntitiesOfType
is a ModelBuilder extension that allows configuring all entities inheriting common interfaces.
Additional Features
Library Kritikos.Configuration.Peristence.IdentityServer
contains an ApiAuthorizationDbContext wrapper for Microsoft.AspNetCore.ApiAuthorization.IdentityServer
handling the missing overload for IdentityDbContext<TUser,TRole,TKey>
.
KritikosConfiguration.Persistence.HealthCheck
offers a basic DbContext IHealthCheck for use with ASP .NET Core.
Converters
Use with care, not all converters support every available query execution at database level. Consult the documentation before applying.
- DirectoryInfo to string
- FileInfo to string
- Relative URI to string
- TimeSpan to number
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Kritikos.Configuration.Persistence.Contracts:
Package | Downloads |
---|---|
Kritikos.Configuration.Persistence
A starting point for EF Core persistance providing extension methods for migrating, hosted services and the infrastructure needed to setup an auditing system for any DbContext |
GitHub repositories
This package is not used by any popular GitHub repositories.