GrumpTech.EntityWebApi.AutoMapper 0.1.3

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

EntityWebApi.AutoMapper

Part of EntityWebApi.

This library provides convention-based object mapping, automatically creating mappings between Entity Framework Core entities and DTOs based on their names with minimal configuration.

Getting Started

Register the mapper store

Register the mapper store with the dependency injection container. The mapper store acts as a central registry for named AutoMapper configurations.

services.AddMapperStore();

Configure mappings

Register a named mapper and configure the mappings between your Entity Framework Core entities and DTOs.

app.AddToMapperStore("EntityMapper", config =>
{
    config.AddEntityFrameworkCoreCollectionMappers(dataContext);
    config.CreateEntityMaps(dataContext, typeStore, "Dto");
    config.CreateMapsToEntity(dataContext, typeStore, "PostDto");
    config.CreateMapsToEntity(dataContext, typeStore, "PutDto");
    config.CreateMapsToEntity(dataContext, typeStore, "PatchDto");
});

This configuration:

  • Creates and registers a named mapper called EntityMapper.
  • Registers collection mappers that update existing Entity Framework Core navigation collections instead of replacing them, preserving Entity Framework Core change tracking.
  • Automatically creates mappings from entities to DTOs whose names end with Dto.
  • Automatically creates mappings from DTOs whose names end with PostDto, PutDto, and PatchDto back to their corresponding entities.

Retrieve the mapper

Resolve the configured mapper from the mapper store by name.

var mapper = mapperStore.GetMapper("EntityMapper");

The returned IMapper can be used anywhere AutoMapper mappings are required.

Product Compatible and additional computed target framework versions.
.NET 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
0.1.3 112 8/2/2026
0.1.2 106 7/31/2026
0.1.1 102 7/20/2026
0.1.0 112 7/19/2026