EssaLab.StronglyTypedIds.Core 1.0.0-preview

This is a prerelease version of EssaLab.StronglyTypedIds.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package EssaLab.StronglyTypedIds.Core --version 1.0.0-preview
                    
NuGet\Install-Package EssaLab.StronglyTypedIds.Core -Version 1.0.0-preview
                    
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="EssaLab.StronglyTypedIds.Core" Version="1.0.0-preview">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EssaLab.StronglyTypedIds.Core" Version="1.0.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="EssaLab.StronglyTypedIds.Core">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 EssaLab.StronglyTypedIds.Core --version 1.0.0-preview
                    
#r "nuget: EssaLab.StronglyTypedIds.Core, 1.0.0-preview"
                    
#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 EssaLab.StronglyTypedIds.Core@1.0.0-preview
                    
#: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=EssaLab.StronglyTypedIds.Core&version=1.0.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EssaLab.StronglyTypedIds.Core&version=1.0.0-preview&prerelease
                    
Install as a Cake Tool

EssaLab.StronglyTypedIds.Core

Incremental Source Generator for Strongly Typed IDs in .NET

This package provides the core engine for generating type-safe, immutable ID records for your domain entities.

✨ Features

  • 🚀 Incremental Source Generator: Optimized for performance with zero build-time impact.
  • 🏗️ Clean Architecture Reference: Use this in your Domain layer.
  • 🛠️ Rich Functionality: Generates IComparable<T>, IEquatable<T>, TypeConverter, and professional XML Documentation.
  • 🎯 Flexible: Support for Guid, int, and long backing types.

🏁 Quick Start

  1. Install the package:

    dotnet add package EssaLab.StronglyTypedIds.Core
    
  2. Define your IDs:

    using EssaLab.StronglyTypedIds.Core;
    
    [StronglyTypedId]
    public partial record UserId;
    
    [StronglyTypedId(IdType.Long)]
    public partial record OrderId;
    
  3. Enjoy type safety:

    // This will cause a compiler error if you mix them up!
    void Process(UserId userId, OrderId orderId) { ... }
    

📜 Full Documentation

For more details and integration with EF Core and JSON, visit the Main Repository.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.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
2.0.0 159 3/28/2026
1.0.0-preview 159 3/13/2026