ByteAether.Ulid.linq2db 1.3.9-preview.0

Prefix Reserved
This is a prerelease version of ByteAether.Ulid.linq2db.
dotnet add package ByteAether.Ulid.linq2db --version 1.3.9-preview.0
                    
NuGet\Install-Package ByteAether.Ulid.linq2db -Version 1.3.9-preview.0
                    
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="ByteAether.Ulid.linq2db" Version="1.3.9-preview.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ByteAether.Ulid.linq2db" Version="1.3.9-preview.0" />
                    
Directory.Packages.props
<PackageReference Include="ByteAether.Ulid.linq2db" />
                    
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 ByteAether.Ulid.linq2db --version 1.3.9-preview.0
                    
#r "nuget: ByteAether.Ulid.linq2db, 1.3.9-preview.0"
                    
#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 ByteAether.Ulid.linq2db@1.3.9-preview.0
                    
#: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=ByteAether.Ulid.linq2db&version=1.3.9-preview.0&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ByteAether.Ulid.linq2db&version=1.3.9-preview.0&prerelease
                    
Install as a Cake Tool

ULID LinqToDB Integration

from ByteAether

License LinqToDB 6.0.0+ NuGet Version NuGet Downloads

An official extension package for ByteAether.Ulid, providing seamless integration with LinqToDB. It enables effortless mapping of Ulid and Ulid? properties to database columns using customizable persistence strategies.

For the core library and full details, visit our GitHub repository.

Features

.NET AOT Ready .NET 10.0 .NET 8.0 .NET Standard 2.0

  • Version Support: Fully compatible with LinqToDB versions 6.0.0 and newer.
  • Automated Configuration: Register mappings globally for both nullable and non-nullable Ulid types using a single extension method on your DataOptions.
  • Flexible Storage Strategies: Choose how your identifiers are persisted based on your database engine constraints:
    • String: 26-character Crockford's Base32 string (mapped to DataType.Char). (Default)
    • Binary: 16-byte binary payload (mapped to DataType.Binary).
    • Guid: Native UUID format (mapped to DataType.Guid).
    • SqlServerGuid: Shuffled sequential uniqueidentifier optimized to maintain index sorting properties inside Microsoft SQL Server.

Installation

Install the stable package via NuGet:

dotnet add package ByteAether.Ulid.linq2db

Usage

Call the RegisterUlid extension method on your DataOptions instance to register the type mappings across your LinqToDB queries:

using LinqToDB;
using ByteAether.Ulid.LinqToDB;

var options = new DataOptions()
    .UseSQLite()
    .UseConnectionString(connectionString)
    // Registers mapping for both Ulid and Ulid? types.
    // Supports: UlidStorageFormat.String (Default), Binary, Guid, and SqlServerGuid
    .RegisterUlid(UlidStorageFormat.Binary);

⚠️ Important Limitations and Configuration Warnings

Range Queries & Sorting Compatibility (>=, <=, OrderBy)

All storage formats are technically supported, but their ability to maintain chronological sorting and support range queries depends entirely on how the underlying database provider handles GUID byte layouts. Because ULIDs rely on a big-endian timestamp for sorting, your choice of database provider determines which formats remain index-friendly:

  • Globally Safe (String and Binary): These formats preserve the raw left-to-right chronological order of ULIDs natively across all database engines (SQLite, PostgreSQL, SQL Server, etc.).
  • Provider Dependent (Guid): Standard .NET Guid structures use a mixed-endian layout.
    • PostgreSQL: Supported. The connection driver automatically corrects the endianness when mapping to native uuid columns, preserving chronological sorting.
    • SQLite / Others: Incompatible for range queries. These engines store GUIDs as raw byte streams, meaning the mixed-endian layout will scramble chronological comparison (though equality operations remain fully functional).
  • SQL Server Specific (SqlServerGuid): This format explicitly optimizes byte shuffling for Microsoft SQL Server's unique sequential indexing rules. It should only be paired with SQL Server if range operations are required.

CRITICAL: Before using Guid or SqlServerGuid formats for range queries (>=, <=) or OrderBy clauses, verify your database provider's native UUID comparison behavior. Misaligning the format with the engine's sorting behavior will result in broken data retrieval and missed records.

Native AOT & Trimming Compatibility

ByteAether.Ulid.linq2db is fully trimmed and annotated for Native AOT compilation. It introduces zero reflection or dynamic code generation.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.3.9-preview.0 0 7/11/2026