Noayo.Domain
0.0.1
dotnet add package Noayo.Domain --version 0.0.1
NuGet\Install-Package Noayo.Domain -Version 0.0.1
<PackageReference Include="Noayo.Domain" Version="0.0.1" />
<PackageVersion Include="Noayo.Domain" Version="0.0.1" />
<PackageReference Include="Noayo.Domain" />
paket add Noayo.Domain --version 0.0.1
#r "nuget: Noayo.Domain, 0.0.1"
#:package Noayo.Domain@0.0.1
#addin nuget:?package=Noayo.Domain&version=0.0.1
#tool nuget:?package=Noayo.Domain&version=0.0.1
Noayo
Noayo (from French noyau, "core" or "kernel") is a family of lightweight .NET class libraries that provide foundational building blocks for domain modelling and infrastructure wiring in line-of-business applications.
Packages
| Package | Description |
|---|---|
Noayo.Domain |
Dependency-free core: entity identity, auditing, timestamps, soft deletion, paged results |
Noayo.Domain.EntityFrameworkCore |
EF Core interceptors and model-builder helpers (planned) |
Noayo.Domain.FastEndpoints |
FastEndpoints ICommandMiddleware integrations (planned) |
Noayo.Domain.AspNetCore |
Default ICurrentUserAccessor over IHttpContextAccessor (planned) |
Install
dotnet add package Noayo.Domain
Target Frameworks: net8.0, net9.0
Quick Start
Define an entity
using Noayo.Domain.Auditing;
using Noayo.Domain.Entities;
using Noayo.Domain.SoftDeletion;
public class Customer
: IEntity<Guid>, IAuditable, IAuditable<Guid>, ITimeStamped, ISoftDeletable<Guid>
{
public Guid Id { get; set; }
// IAuditable — display names
public string? CreatedBy { get; set; }
public string? UpdatedBy { get; set; }
// IAuditable<Guid> — typed FK
public Guid? CreatedByUserId { get; set; }
public Guid? UpdatedByUserId { get; set; }
// ITimeStamped
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
// ISoftDeletable<Guid>
public bool IsDeleted { get; set; }
public DateTime? DeletedAt { get; set; }
public string? DeletedBy { get; set; }
public Guid? DeletedByUserId { get; set; }
// Domain properties
public string Name { get; set; } = string.Empty;
}
Return a paged result
using Noayo.Domain.Paging;
PagedResult<Customer> result = new(
items: customers,
pageNumber: 1,
pageSize: 20,
totalCount: 150);
Console.WriteLine($"Page {result.PageNumber} of {result.TotalPages}");
Console.WriteLine($"Has next page: {result.HasNextPage}");
Attribute-based opt-in
using Noayo.Domain.Attributes;
[Audited]
[SoftDeleted]
public class CreateCustomerCommand { /* … */ }
Infrastructure code (e.g. an EF Core SaveChangesInterceptor) can use [Audited] as a convention-based alternative to implementing IAuditable + ITimeStamped, and [SoftDeleted] as an alternative to ISoftDeletable.
IAuditContext seam
IAuditContext is the dependency-free contract between the request pipeline and the persistence layer:
// Request pipeline (e.g. FastEndpoints middleware) sets the flags:
auditContext.AuditEnabled = true;
auditContext.SoftDeleteEnabled = true;
// Persistence interceptor reads them during SaveChanges.
Register AuditContext as scoped in your DI container:
services.AddScoped<IAuditContext, AuditContext>();
Companion Packages (Planned)
Behavior implied by the interfaces is wired up in separate packages, each depending only on Noayo.Domain plus the one framework it integrates with:
Noayo.Domain.EntityFrameworkCore—AuditSaveChangesInterceptor,SoftDeleteSaveChangesInterceptor,ApplySoftDeleteQueryFilters(),ToPagedResultAsync().Noayo.Domain.FastEndpoints—AuditMiddleware<TRequest, TResponse>that reads[Audited]/[SoftDeleted]attributes and sets flags on the scopedIAuditContext.Noayo.Domain.AspNetCore— DefaultICurrentUserAccessorbacked byIHttpContextAccessor.
License
| 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
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1 | 134 | 5/23/2026 |