Dev.to WebDev πŸ›  Dev πŸ‘ 1 πŸ“– 2 min read

Native ASP.NET Core & CLI Support in ByteAether.Ulid v1.4.2

A production-grade identifier library requires tight integration across data persistence layers, API boundary definitions, and operational tooling. ByteAether.Ulid implements a high-performance, specification-compliant .

A production-grade identifier library requires tight integration across data persistence layers, API boundary definitions, and operational tooling. ByteAether.Ulid implements a high-performance, specification-compliant .NET type for the ULID standard, engineering strict monotonicity, throughput optimization, and deterministic ordering under high-concurrency workloads.

The ByteAether.Ulid v1.4.2 release extends the ecosystem beyond the core primitive. Alongside existing ORM integrations, the repository now provides two specialized packages targeting modern .NET architectures:

  • ByteAether.Ulid.AspNetCore: Native route constraints, System.Text.Json converters, and OpenAPI schema generators.
  • ByteAether.Ulid.Cli: A cross-platform global tool for generating, parsing, and inspecting ULIDs within shell scripts and operational pipelines.

Source-First ASP.NET Core Integration

ByteAether.Ulid.AspNetCore introduces native framework bindings for ASP.NET Core pipelines:

  • Route Constraints (:ulid): Evaluates incoming 26-character Base32 route parameters at the routing layer before triggering controller instantiation or delegate execution.
  • System.Text.Json Serialization: Direct JsonConverter<Ulid> and JsonConverter<Ulid?> implementations handling canonical string representations without intermediate allocations.
  • OpenAPI Integration: Schema transformers injecting the string format with a ulid designator into both Microsoft.AspNetCore.OpenApi and Swashbuckle metadata models.
  • Native AOT & Trim Compatibility: Fully compatible with source-generated JSON serializer contexts (JsonSerializerContext) required for Native AOT deployments.
using ByteAether.Ulid;
using ByteAether.Ulid.AspNetCore;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddUlidRouteConstraint();

var app = builder.Build();
app.MapGet("/users/{id:ulid}", (Ulid id)
    => Results.Ok(new UserResponse(id))
);
app.Run();

public record UserResponse(Ulid Id);

By handling parsing and model binding at the routing boundary, the framework prevents malformed identifier requests from executing pipeline middleware or reaching application handlers.

Operational Tooling: CLI Generation and Inspection

ByteAether.Ulid.Cli provides shell-level operations for inspecting and generating ULIDs. Install the utility via the .NET SDK tool registry:

dotnet tool install -g ByteAether.Ulid.Cli

Scripting Capabilities

  • Format Interoperability: Converts canonical Base32 strings into raw Hexadecimal or System.Guid byte layouts.
  • Deterministic Timestamp Overrides: Accepts custom unix epoch timestamps to reproduce state or generate test fixtures.
  • Structured JSON Output: Emits machine-readable breakdown payloads for ingestion by tools like jq or PowerShell automation.
# Generate sequential identifiers in batches
ulid --count 5

# Parse and inspect internal structure
ulid 01AN4Z07BY79KA1307SR9X4MV3

# Process standard input streams for log analysis
cat ulids.txt | ulid --json

Read the complete technical deep dive and view benchmarks in the original article on our blog: https://byteaether.github.io/2026/byteaetherulid-v142-expands-the-net-ecosystem-with-aspnet-core-and-cli-support/

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.