Fluent.Unions.AutoMapper
0.3.0
See the version list below for details.
dotnet add package Fluent.Unions.AutoMapper --version 0.3.0
NuGet\Install-Package Fluent.Unions.AutoMapper -Version 0.3.0
<PackageReference Include="Fluent.Unions.AutoMapper" Version="0.3.0" />
<PackageVersion Include="Fluent.Unions.AutoMapper" Version="0.3.0" />
<PackageReference Include="Fluent.Unions.AutoMapper" />
paket add Fluent.Unions.AutoMapper --version 0.3.0
#r "nuget: Fluent.Unions.AutoMapper, 0.3.0"
#:package Fluent.Unions.AutoMapper@0.3.0
#addin nuget:?package=Fluent.Unions.AutoMapper&version=0.3.0
#tool nuget:?package=Fluent.Unions.AutoMapper&version=0.3.0
![]()
Fluent.Unions.AutoMapper
Maps Option<T> properties with AutoMapper: T? to Option<T>, Option<T> to T?, and Option<TSource> to Option<TDestination>. It builds on Fluent.Unions.
AutoMapper licensing. This package depends on AutoMapper 17, which Lucky Penny Software dual licenses: the Reciprocal Public License 1.5 (RPL-1.5) or a commercial agreement. Read the AutoMapper terms before you use it. AutoMapper may ask for a license key and may log a warning without one.
Installation
dotnet add package Fluent.Unions.AutoMapper
Usage
using AutoMapper;
using Fluent.Unions.AutoMapper;
var configuration = new MapperConfiguration(cfg =>
{
cfg.AddFluentUnions();
cfg.CreateMap<Address, AddressDto>();
cfg.CreateMap<Person, PersonDto>().ReverseMap(); // string? Nickname <-> Option<string> Nickname
});
configuration.AssertConfigurationIsValid();
None and null map to each other, and the element is mapped with the maps you create. Option<int> to int gives 0 for None. AssertConfigurationIsValid reports a missing element map, such as Address to AddressDto.
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- AutoMapper (>= 17.0.0)
- Fluent.Unions (>= 0.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.