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" />
<PackageReference Include="ArchPillar.Extensions.Mapper.EntityFrameworkCore" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=ArchPillar.Extensions.Mapper.EntityFrameworkCore&version=1.3.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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-writtenSelect, and it is inlined into the mapper's projection expression so the whole query is still translated server-side. - Flat SQL
CASEfor enum mappers —EnumMapper.Map()/SymmetricEnumMapper.Map()calls used directly in a query are translated to a single flatCASE … WHEN … ENDinstead 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 | Versions 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.
-
net10.0
- ArchPillar.Extensions.Mapper (>= 1.3.6)
- Microsoft.EntityFrameworkCore (>= 10.0.5)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging (>= 10.0.5)
-
net8.0
- ArchPillar.Extensions.Mapper (>= 1.3.6)
- Microsoft.EntityFrameworkCore (>= 8.0.25)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.25)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging (>= 8.0.1)
-
net9.0
- ArchPillar.Extensions.Mapper (>= 1.3.6)
- Microsoft.EntityFrameworkCore (>= 9.0.14)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.14)
- Microsoft.Extensions.DependencyInjection (>= 9.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.14)
- Microsoft.Extensions.Logging (>= 9.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.