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
                    
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="Atya.Foundation.Abstractions" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Atya.Foundation.Abstractions" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Atya.Foundation.Abstractions" />
                    
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 Atya.Foundation.Abstractions --version 1.0.4
                    
#r "nuget: Atya.Foundation.Abstractions, 1.0.4"
                    
#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 Atya.Foundation.Abstractions@1.0.4
                    
#: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=Atya.Foundation.Abstractions&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Atya.Foundation.Abstractions&version=1.0.4
                    
Install as a Cake Tool

Atya.Foundation.Abstractions

Provider-neutral contracts for Atya foundation packages.

NuGet Version Downloads net10.0 License: MIT

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> and IEntity<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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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