eQuantic.Linq.SourceGenerator 2.1.0

dotnet add package eQuantic.Linq.SourceGenerator --version 2.1.0
                    
NuGet\Install-Package eQuantic.Linq.SourceGenerator -Version 2.1.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="eQuantic.Linq.SourceGenerator" Version="2.1.0">
  <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="eQuantic.Linq.SourceGenerator" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="eQuantic.Linq.SourceGenerator">
  <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 eQuantic.Linq.SourceGenerator --version 2.1.0
                    
#r "nuget: eQuantic.Linq.SourceGenerator, 2.1.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 eQuantic.Linq.SourceGenerator@2.1.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=eQuantic.Linq.SourceGenerator&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=eQuantic.Linq.SourceGenerator&version=2.1.0
                    
Install as a Cake Tool

eQuantic.Linq.SourceGenerator

Source generator for eQuantic.Linq that provides compile-time type-safe specifications, filters, and sorting.

Features

  • Type-Safe Code Generation: Generate specifications, filters, and sorting methods at compile-time
  • 🚀 Zero Runtime Reflection: All code is generated during compilation for maximum performance
  • 🧠 IntelliSense Support: Full code completion and type safety
  • 🎯 Customizable: Configure generation behavior with attributes

Quick Start

  1. Install the package:
<PackageReference Include="eQuantic.Linq.SourceGenerator" Version="1.0.0" 
                  OutputItemType="Analyzer" 
                  ReferenceOutputAssembly="true" />
  1. Mark your classes:
[GenerateSpecifications(IncludeFilters = true, IncludeSorting = true)]
public partial class User
{
    public int Id { get; set; }
    public string Name { get; set; }
    public int Age { get; set; }
    public bool IsActive { get; set; }
}
  1. Use the generated code:
// Type-safe specifications
var spec = User.Specifications.NameContains("John")
    .And(User.Specifications.AgeGreaterThan(18));

// Type-safe filters
var filter = User.Filters.ByName("John Doe");

// Type-safe sorting
var sorter = User.Sorting.ByNameAscending()
    .ThenByAgeDescending();

Documentation

For complete documentation, visit: https://github.com/equantic/core-linq

License

MIT License

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.1.0 162 8/29/2025
2.0.0 171 8/28/2025