Atya.Foundation.Abstractions
1.0.4
Prefix Reserved
dotnet add package Atya.Foundation.Abstractions --version 1.0.4
NuGet\Install-Package Atya.Foundation.Abstractions -Version 1.0.4
<PackageReference Include="Atya.Foundation.Abstractions" Version="1.0.4" />
<PackageVersion Include="Atya.Foundation.Abstractions" Version="1.0.4" />
<PackageReference Include="Atya.Foundation.Abstractions" />
paket add Atya.Foundation.Abstractions --version 1.0.4
#r "nuget: Atya.Foundation.Abstractions, 1.0.4"
#:package Atya.Foundation.Abstractions@1.0.4
#addin nuget:?package=Atya.Foundation.Abstractions&version=1.0.4
#tool nuget:?package=Atya.Foundation.Abstractions&version=1.0.4
Atya.Foundation.Abstractions
Provider-neutral contracts for Atya foundation packages.
Overview
Atya.Foundation.Abstractions provides the smallest shared contracts used by Atya foundation packages and applications that need provider-neutral model, paging, audit, soft-delete, and result abstractions.
The package intentionally contains interfaces only. It does not choose an ORM, persistence provider, validation framework, or result implementation.
Features
- Strongly typed identifier contracts through
IHasId<TId>andIEntity<TId>. - Audit metadata through
IAuditable. - Soft-delete metadata through
ISoftDeletable. - Paging request shape through
IPagedQuery. - A minimal result-like success contract through
IResult. - No runtime package dependencies.
Installation
.NET CLI
dotnet add package Atya.Foundation.Abstractions
Package Manager
Install-Package Atya.Foundation.Abstractions
PackageReference
<PackageReference Include="Atya.Foundation.Abstractions" Version="1.0.3" />
Quick Start
using System;
using Atya.Foundation.Abstractions;
Order order = new(Guid.NewGuid())
{
CreatedAtUtc = DateTimeOffset.UtcNow,
CreatedBy = "system",
};
IResult result = order;
Console.WriteLine(order.Id);
Console.WriteLine(result.IsFailure);
public sealed class Order(Guid id) : IEntity<Guid>, IAuditable, IResult
{
public Guid Id { get; } = id;
public DateTimeOffset CreatedAtUtc { get; set; }
public string? CreatedBy { get; set; }
public DateTimeOffset? LastModifiedAtUtc { get; set; }
public string? LastModifiedBy { get; set; }
public bool IsSuccess => true;
}
Usage
Use these contracts at package boundaries when code needs to depend on a stable shape without depending on an implementation package.
using System;
using Atya.Foundation.Abstractions;
public sealed record CustomerId(Guid Value);
public sealed class Customer(CustomerId id) : IEntity<CustomerId>, ISoftDeletable
{
public CustomerId Id { get; } = id;
public bool IsDeleted { get; set; }
public DateTimeOffset? DeletedAtUtc { get; set; }
public string? DeletedBy { get; set; }
}
IResult.IsFailure is provided as a default interface member and is always the negation of IsSuccess.
API Overview
| Type | Purpose |
|---|---|
IHasId<TId> |
Exposes a strongly typed Id value. |
IEntity<TId> |
Minimal entity contract that also implements IHasId<TId>. |
IAuditable |
Adds created and last-modified UTC timestamps plus actor fields. |
ISoftDeletable |
Adds logical deletion state, timestamp, and actor fields. |
IPagedQuery |
Exposes a 1-based page number and requested page size. |
IResult |
Exposes IsSuccess and the default IsFailure inverse. |
Dependencies
The shipped library has no runtime package dependencies. Build, test, benchmark, and packaging tools are repository-local development dependencies and are not part of the consumer dependency graph.
Package Boundaries
This package defines contracts only. It does not provide persistence mappings, paging validation, audit population, soft-delete policies, or concrete result types.
Project Structure
src/Abstractions/ shipped package source and NuGet README
tests/Abstractions.UnitTests/ contract-focused unit tests
samples/Abstractions.Samples.Console/ runnable sample usage
benchmarks/Abstractions.Benchmarks/ BenchmarkDotNet harness
.github/workflows/ CI, CodeQL, dependency review, and publish workflows
Abstractions.sln solution file
README.md GitHub README
LICENSE MIT license
Compatibility
Targets net10.0.
Testing
dotnet test ./tests/Abstractions.UnitTests/Abstractions.UnitTests.csproj --configuration Release
Benchmarks
The repository includes a BenchmarkDotNet harness for contract access patterns. No benchmark result claims are published in this README.
dotnet run --project ./benchmarks/Abstractions.Benchmarks/Abstractions.Benchmarks.csproj --configuration Release
Contributing
Contributions are welcome. Please open an issue or pull request on GitHub.
License
Released under the MIT license. See LICENSE for details.
About Atya Libraries
Atya.Foundation.Abstractions is part of Atya Libraries, a family of focused, modern .NET libraries published under the reserved Atya.* prefix on NuGet. Every package shares the same principles: a small, clear public API, full test coverage, and consistent documentation.
Browse the full collection on GitHub and NuGet.
Made with .NET. Copyright 2026 Atya Libraries.
| 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
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Atya.Foundation.Abstractions:
| Package | Downloads |
|---|---|
|
Atya.Foundation.Primitives
Low-level reusable primitives for Atya foundation packages. |
|
|
Atya.Messaging.Abstractions
Transport-agnostic messaging contracts for publishers, consumers, and envelopes in Atya services. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.4 | 281 | 7/1/2026 |
| 1.0.3 | 368 | 5/2/2026 |
| 1.0.2 | 113 | 5/2/2026 |
| 1.0.1 | 100 | 5/2/2026 |
| 0.0.0-alpha.0 | 58 | 5/2/2026 |