![]() |
VOOZH | about |
dotnet add package Extenso.Mapping --version 10.0.2
NuGet\Install-Package Extenso.Mapping -Version 10.0.2
<PackageReference Include="Extenso.Mapping" Version="10.0.2" />
<PackageVersion Include="Extenso.Mapping" Version="10.0.2" />Directory.Packages.props
<PackageReference Include="Extenso.Mapping" />Project file
paket add Extenso.Mapping --version 10.0.2
#r "nuget: Extenso.Mapping, 10.0.2"
#:package Extenso.Mapping@10.0.2
#addin nuget:?package=Extenso.Mapping&version=10.0.2Install as a Cake Addin
#tool nuget:?package=Extenso.Mapping&version=10.0.2Install as a Cake Tool
<img src="https://github.com/gordon-matt/Extenso/blob/master/_Misc/ExtensoLogo.png" alt="Logo" width="250" />
A lightweight, simpler alternative to AutoMapper, complete with expression mapping for predicates, includes, projections, etc.
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());
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 | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
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. |
This package is not used by any popular GitHub repositories.