DeepMapper 1.0.0
See the version list below for details.
dotnet add package DeepMapper --version 1.0.0
NuGet\Install-Package DeepMapper -Version 1.0.0
<PackageReference Include="DeepMapper" Version="1.0.0" />
paket add DeepMapper --version 1.0.0
#r "nuget: DeepMapper, 1.0.0"
// Install DeepMapper as a Cake Addin
#addin nuget:?package=DeepMapper&version=1.0.0
// Install DeepMapper as a Cake Tool
#tool nuget:?package=DeepMapper&version=1.0.0
Deep Mapper
It is an object mapper with zero configuration. It maps using two methods conventional mapping and configurational mapping. It also maps the nested classes recursivley to a new instance. This library can be used for deep copying as well.
Add DI to the project.
services.AddDeepMapping(config =>
{
config.UseConventionalMapping();
});
Conventional Mapping
This method requires no configurations and uses property names to map objects and set the unmatched properties to default. Use IConventionalMapper interface or IDeepMapper.
var obj = mapper.Map<TDestination>(TSource);
Configurational Mapping
In this method the library uses configuration for a types in the service registeration.
config.Map<TSource, TDestination>()
.ToProperty(destination => TProperty, source => TProperty)
.ToConstant(destination => TProperty, object)
.ToDefault(destination => TProperty)
.Ignore(destination => TProperty);
The UseConventionalMapping() in the configuration enables the configurational mapper to map the rest of the properties using name conventions.
// Use IDeepMapper for configurational mapping
var obj = mapper.Map<TDestination>(TSource);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.Extensions.DependencyInjection (>= 6.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.