NDB.Kit 1.0.4

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

NDB.Kit

Application productivity kit for modern .NET applications.

NDB.Kit is a lightweight helper library that sits above infrastructure and below business logic, designed to reduce repetitive boilerplate in clean and modular .NET architectures.

This library is intentionally opinionated but framework-agnostic.


What does NDB.Kit provide?

NDB.Kit bundles several small but powerful building blocks:

  • AutoMapper convention-based mapping
  • EF Core guardrails and audit integration
  • Enum and primitive parsing helpers
  • Guard clauses for validation
  • Collection and string utilities
  • Result helpers integrated with NDB.Abstraction

All modules are optional and can be used independently.


Design Principles

  • No business logic
  • No UI or HTTP concerns
  • No DAL replacement
  • Safe defaults (e.g. AsNoTracking)
  • Explicit, readable, and testable
  • Open-source friendly

Installation

dotnet add package NDB.Kit

Modules Overview

Mapping (AutoMapper)

Define mappings by implementing simple marker interfaces.

using NDB.Kit.Mapping;
using AutoMapper;

public class VehicleResponse : IMapFrom<Vehicle>
{
    public Guid Id { get; set; }
    public string EngineNumber { get; set; }

    public void Mapping(IMappingExpression<Vehicle, object> map)
    {
        map.ForMember(d => d.EngineNumber,
            opt => opt.MapFrom(s => s.EngineNumber.Trim()));
    }
}

Register once:

services.AddAutoMapper(cfg =>
{
    cfg.AddProfile(new AutoMappingProfile());
}, Assembly.GetExecutingAssembly());

EF Core Helpers

Usages Example

Guard Clauses

Guard.AgainstNull(request);
Guard.AgainstEmpty(request.EngineNumber, nameof(request.EngineNumber));
Guard.AgainstDefault(request.CompanyId, nameof(request.CompanyId));

Enum Parsing

var status = EnumHelper.ParseOrDefault(
    request.Status,
    ProductionStatusEnum.Unknown);

Primitive Parsing

var lot = Parse.Int(request.Lot);
var amount = Parse.Decimal(request.Amount);
var id = Parse.Guid(request.Id);

Returns nullable values instead of throwing.

Collection Helpers

foreach (var (index, item) in items.WithIndex())
{
    Console.WriteLine($"{index}. {item}");
}

String Normalization

var code = StringNormalize.Normalize(
    input,
    removeWhitespace: true,
    upper: true);

Result Helpers (NDB.Abstraction)

return ResultGuard.NotFoundIfNull(vehicle, "Vehicle not found");

return ResultGuard.FailIf(
    quantity <= 0,
    "Quantity must be greater than zero");

What NDB.Kit is NOT

  • Not a DAL
  • Not a Web framework
  • Not a UI helper library
  • Not a validation framework
  • Not a replacement for EF Core, AutoMapper, or MediatR
  • NDB.Abstraction Request, result, validation, and common contracts.

  • NDB.Audit.EF EF Core audit trail with old/new values and actor tracking.

Each library is independent and can be used separately.

Final Notes

If you are building a clean architecture, modular monolith, or enterprise-grade .NET system, NDB.Kit helps you stay productive without sacrificing clarity or control.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
1.0.4 109 3/1/2026
1.0.3 202 12/22/2025
1.0.2 224 12/19/2025
1.0.1 239 12/19/2025
1.0.0 296 12/18/2025