Extenso.Mapping 9.3.1.1

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

NuGet NuGet

<img src="https://github.com/gordon-matt/Extenso/blob/master/_Misc/ExtensoLogo.png" alt="Logo" width="250" />

Extenso.Mapping

Intro

A lightweight, simpler alternative to AutoMapper, complete with expression mapping for predicates, includes, projections, etc.

Examples:

Registration

using Extenso.Mapping;

// Basic registration of a mapping between two types
ExtensoMapper.Register<Person, PersonModel>(x => new()
{
    Id = x.Id,
    FamilyName = x.FamilyName,
    GivenNames = x.GivenNames,
    DateOfBirth = x.DateOfBirth
});

// Recommended: use an extension method, as it's cleaner and you can use the extension method directly in most cases
// Only use ExtensoMapper where needed. For example, generic classes, where you don't know the types at compile time.
ExtensoMapper.Register<Person, PersonModel>(x => x.ToModel());

Mapping

using Extenso.Mapping;

var model = personEntity.MapTo<PersonModel>();

// or:
var model = ExtensoMapper.Map<Person, PersonModel>(personEntity);

You can map expressions as well. See the ExtensoMapperEntityFrameworkRepository in the Extenso.Data.Entity project for an example

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Extenso.Mapping:

Package Downloads
Extenso.Data.Entity

This library provides a generic repository interface and base class, as well as other data-related extension methods and helper classes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.3.1.1 129 6/2/2025
9.3.0 108 5/25/2025
9.2.0 79 5/3/2025