BAYSOFT.Abstractions 10.0.3

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

BAYSOFT.Abstractions Nuget

BAYSOFT.Abstractions is a core .NET library developed by BAYSOFT, providing abstraction layers and foundational interfaces for building clean architecture, domain-driven design and application services in C# (.NET).
It supports projects leveraging CQRS, MediatR, FluentValidation and other modern patterns.

πŸ” Overview

In enterprise or modular .NET applications, it's beneficial to define abstraction layers that decouple infrastructure from domain and application logic.
BAYSOFT.Abstractions provides:

  • Common base interfaces and marker types for commands, queries, results and domain services.
  • Contract definitions (abstractions) for application layers β€” enabling greater testability and adherence to dependency inversion.
  • Patterns following CQRS + MediatR + FluentValidation, allowing you to build application logic with consistency and minimal boilerplate.
  • A shared library to reduce duplication, enforce uniform architecture and accelerate new service development.

βœ… Key Features

  • Core abstractions for Commands (ICommand), Queries (IQuery<TResult>), and Handlers (ICommandHandler<TCommand>, IQueryHandler<TQuery, TResult>).
  • Integration friendly with libraries such as MediatR, FluentValidation, and other modular frameworks.
  • Helps define contracts (interfaces) in the Application layer, keeping dependencies one-way (inward) and domain logic clean.
  • Published as a NuGet package BAYSOFT.Abstractions

πŸš€ Installation

Using NuGet Package Manager

Install-Package BAYSOFT.Abstractions

Using .NET CLI

dotnet add package BAYSOFT.Abstractions

πŸ’» Example Usage

Here’s a minimal example to illustrate how you might use the abstractions in your application layer:

// Define a command
public class CreateOrderCommand : ICommand<OrderResult>
{
    public string CustomerId { get; set; }
    public List<OrderItemDto> Items { get; set; }
}

// Define handler
public class CreateOrderHandler : ICommandHandler<CreateOrderCommand, OrderResult>
{
    public async Task<OrderResult> Handle(CreateOrderCommand command, CancellationToken ct)
    {
        // business logic, domain work, persistence, etc.
        ...
        return new OrderResult { OrderId = createdOrder.Id, Success = true };
    }
}

Because these types leverage the abstractions from BAYSOFT.Abstractions, the infrastructure (e.g., MediatR, dependency injection) and application layers can remain loosely coupled and maintainable.

πŸ“š Documentation & Resources

πŸ’‘ Why Use This Library?

  • Keeps your architecture consistent across multiple services or microservices.
  • Helps maintain separation of concerns: infrastructure, application logic, domain.
  • Makes code easier to test, evolve and scale.
  • Provides a standard foundation for new services, reducing startup overhead.

🧠 Best Practices

  • Use the abstractions in the Application layer only. Do not reference infrastructure implementation details here.
  • Keep domain entities and business rules inside the Domain layer; abstractions here help the boundary but do not replace domain logic.
  • Define commands / queries / handlers following the interface patterns provided by the library.
  • Combine with FluentValidation for request validation and MediatR for dispatching commands/queries to handlers.
  • Document new abstraction interfaces clearly and keep them lightweight β€” this library is meant to define contracts, not heavy logic.

🀝 Contributing

Contributions are welcome! If you would like to propose improvements, bug-fixes or new abstractions:

  1. Fork the repository.
  2. Create a branch for your change (e.g., feature/my-new-abstraction).
  3. Ensure your changes include tests if applicable.
  4. Submit a pull request and describe the purpose/impact of your change.

🧾 License

This project is licensed under the MIT License.

You are free to use, modify, and distribute it, provided you credit the original author.

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.

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
10.0.3 89 2/17/2026
10.0.2 94 2/3/2026
10.0.1.2 99 1/24/2026
10.0.1.1 100 1/13/2026
10.0.1 93 1/12/2026
9.0.10.1 380 11/30/2025
9.0.10 214 10/27/2025
8.0.6.22 216 10/2/2025
8.0.6.21 204 10/2/2025
8.0.6.20 199 10/2/2025
8.0.6.19 206 10/2/2025
8.0.6.18 201 10/1/2025
8.0.6.17 226 3/1/2025
8.0.6.16 184 2/15/2025
8.0.6.15 311 10/30/2024
8.0.6.14 190 10/7/2024
8.0.6.13 180 10/7/2024
8.0.6.12 198 7/13/2024
8.0.6.11 192 7/11/2024
8.0.6.10 235 6/28/2024
Loading failed