Fluent.Unions.AutoMapper 0.3.0

There is a newer version of this package available.
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
                    
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="Fluent.Unions.AutoMapper" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fluent.Unions.AutoMapper" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Fluent.Unions.AutoMapper" />
                    
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 Fluent.Unions.AutoMapper --version 0.3.0
                    
#r "nuget: Fluent.Unions.AutoMapper, 0.3.0"
                    
#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.
#:package Fluent.Unions.AutoMapper@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fluent.Unions.AutoMapper&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Fluent.Unions.AutoMapper&version=0.3.0
                    
Install as a Cake Tool

Fluent.Unions

Fluent.Unions.AutoMapper

NuGet Downloads Publish Documentation

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 Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 85 11/22/2026
1.0.0 96 11/21/2026
0.3.0 104 11/20/2026