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
<PackageReference Include="Extenso.Mapping" Version="9.3.1.1" />
<PackageVersion Include="Extenso.Mapping" Version="9.3.1.1" />
<PackageReference Include="Extenso.Mapping" />
paket add Extenso.Mapping --version 9.3.1.1
#r "nuget: Extenso.Mapping, 9.3.1.1"
#addin nuget:?package=Extenso.Mapping&version=9.3.1.1
#tool nuget:?package=Extenso.Mapping&version=9.3.1.1
<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 | Versions 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. |
-
net9.0
- Extenso.Core (>= 9.3.0)
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.