ArchPillar.Extensions.Mapper.EntityFrameworkCore 1.3.6

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

ArchPillar.Extensions.Mapper.EntityFrameworkCore

EF Core integration for ArchPillar.Extensions.Mapper. Opt in once per DbContext and your mappers become first-class citizens inside hand-written LINQ queries.

What it adds

  • Direct Map() / Project() in your own queries — call a mapper for a single property (or a child collection) inside a hand-written Select, and it is inlined into the mapper's projection expression so the whole query is still translated server-side.
  • Flat SQL CASE for enum mappersEnumMapper.Map() / SymmetricEnumMapper.Map() calls used directly in a query are translated to a single flat CASE … WHEN … END instead of a nested conditional chain.

Quick Start

// 1. Register the integration on the DbContext
builder.Services.AddDbContext<AppDbContext>(options =>
    options
        .UseNpgsql(connectionString)
        .UseArchPillarMapper());

// 2. Call mappers directly inside a hand-written query — translated server-side
var summaries = await db.Orders
    .Where(o => o.Customer.UserId == userId)
    .Select(o => new OrderSummary
    {
        Id       = o.Id,
        Status   = mappers.OrderStatusCode.Map(o.Status),      // flat SQL CASE
        Customer = mappers.Customer.Map(o.Customer),           // single property via a mapper
        Lines    = o.Lines.Project(mappers.OrderLine).ToList(),  // collection via a mapper
    })
    .ToListAsync();

Whole-row projection (db.Orders.Project(mappers.Order)) works without this package — the core library is provider-agnostic. This package is for the cases above, where a mapper call sits inside a query you wrote by hand.

Documentation

Full documentation and examples are available at the GitHub repository.

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 is compatible.  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. 
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.6 0 6/3/2026
1.3.5 33 6/2/2026
1.3.4 54 6/1/2026
1.3.3 52 6/1/2026
1.3.2 94 5/28/2026
1.3.1 100 5/27/2026
1.3.0 96 5/22/2026