Kck.Core.Abstractions
3.4.0
dotnet add package Kck.Core.Abstractions --version 3.4.0
NuGet\Install-Package Kck.Core.Abstractions -Version 3.4.0
<PackageReference Include="Kck.Core.Abstractions" Version="3.4.0" />
<PackageVersion Include="Kck.Core.Abstractions" Version="3.4.0" />
<PackageReference Include="Kck.Core.Abstractions" />
paket add Kck.Core.Abstractions --version 3.4.0
#r "nuget: Kck.Core.Abstractions, 3.4.0"
#:package Kck.Core.Abstractions@3.4.0
#addin nuget:?package=Kck.Core.Abstractions&version=3.4.0
#tool nuget:?package=Kck.Core.Abstractions&version=3.4.0
Kck.Core.Abstractions
Core domain primitives — Entity<TId> / AuditableEntity<TId> / FullEntity<TId> hierarchy, Result<T> / Error pattern, and Paginate<T> pagination.
Installation
dotnet add package Kck.Core.Abstractions
Quick Start
// 1. Define a domain entity
public class Order : FullEntity<Guid>
{
public string CustomerName { get; private set; } = string.Empty;
public decimal Total { get; private set; }
public static Order Create(string customerName, decimal total)
{
var order = new Order { CustomerName = customerName, Total = total };
order.AddDomainEvent(new OrderCreatedEvent(order.Id));
return order;
}
}
// 2. Use the Result pattern in handlers
public async Task<Result<Order>> CreateOrderAsync(CreateOrderCommand cmd, CancellationToken ct)
{
if (cmd.Total <= 0)
return Result<Order>.Failure(Error.Validation("Total must be positive."));
var order = Order.Create(cmd.CustomerName, cmd.Total);
await _repo.AddAsync(order, ct);
return Result<Order>.Success(order);
}
// 3. Return paginated results
var page = new Paginate<Order>(items, totalCount, pageIndex: 1, pageSize: 20);
Configuration
This is a contracts-only package — no configuration required. Used as a transitive dependency by provider and bundle packages.
Resources
| Product | Versions 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. |
-
net10.0
- Kck.Pipeline.Abstractions (>= 3.4.0)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Kck.Core.Abstractions:
| Package | Downloads |
|---|---|
|
Kck.Security.Abstractions
Provider-agnostic security contracts. Defines IHashingService (password hashing), IEncryptionService, ITokenService (JWT), ITokenBlacklistService, ISecretsManager, and IMfaProvider. Implement with Argon2, JWT, and Key Vault providers. |
|
|
Kck.Persistence.Abstractions
Provider-agnostic persistence contracts following Repository and Unit of Work patterns. Defines IReadRepository<T,TId>, IWriteRepository<T,TId>, IUnitOfWork, dynamic filtering, and Specification pattern. Implement with the Entity Framework Core provider. |
|
|
Kck.Bundle.WebApi
Opinionated ASP.NET Core WebAPI starter pack. Registers Serilog, in-memory caching, JWT auth, Argon2 hashing, InMemory event bus, OpenTelemetry, rate limiting, security headers, CORS, and global exception handling in a single AddKckWebApiDefaults() call. |
|
|
Kck.Persistence.EntityFramework
Entity Framework Core implementations of IReadRepository<T,TId>, IWriteRepository<T,TId>, and IUnitOfWork. Includes AuditInterceptor (auto CreatedDate/ModifiedDate), DynamicFilterExtensions, soft-delete support, and ToPaginateAsync extension. Registered via AddKckEntityFramework<TContext>(). |
|
|
Kck.Bundle.WorkerService
Opinionated .NET Worker Service starter pack. Registers Serilog, OpenTelemetry, InMemory event bus, and a mutually-exclusive background job scheduler (Hangfire or Quartz) in a single call. |
GitHub repositories
This package is not used by any popular GitHub repositories.