ManualMapper 1.1.0

Package Description

Install-Package ManualMapper -Version 1.1.0
dotnet add package ManualMapper --version 1.1.0
<PackageReference Include="ManualMapper" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ManualMapper --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ManualMapper

ManualMapper is really just a object-to-object mapping registry.
If you like to know exactly what is happening but do not like to search for the right mapping-method then this might be for you!

It completely strips the "Auto"-part of many similar mapping projects like AutoMapper.

Usage

// Create instance of mapper. Usually you only need this one instance in your application.
var mapper = new Mapper()

// Create maps by supplying a mapping method
mapper.CreateMap<SourceType, TargetType>(MapSourceToTarget);

// Map your object to the other type just by providing the target type
TargetType mappedObj = mapper.Map<SourceType, TargetType>(sourceObj);

// Example mapping function:
public TargetType MapSourceToTarget(SourceType src)
{
	return new TargetType 
	{
		DateOfBirth = src.DateOfBirth,
		FirstName = src.FirstName,
		LastName = src.LastName,
		NumberOfOrders = src.NumberOfOrders
	}
}

Installation

To install ManualMapper run the following command in the Package Manager Console:

PM> Install-Package ManualMapper

ManualMapper

ManualMapper is really just a object-to-object mapping registry.
If you like to know exactly what is happening but do not like to search for the right mapping-method then this might be for you!

It completely strips the "Auto"-part of many similar mapping projects like AutoMapper.

Usage

// Create instance of mapper. Usually you only need this one instance in your application.
var mapper = new Mapper()

// Create maps by supplying a mapping method
mapper.CreateMap<SourceType, TargetType>(MapSourceToTarget);

// Map your object to the other type just by providing the target type
TargetType mappedObj = mapper.Map<SourceType, TargetType>(sourceObj);

// Example mapping function:
public TargetType MapSourceToTarget(SourceType src)
{
	return new TargetType 
	{
		DateOfBirth = src.DateOfBirth,
		FirstName = src.FirstName,
		LastName = src.LastName,
		NumberOfOrders = src.NumberOfOrders
	}
}

Installation

To install ManualMapper run the following command in the Package Manager Console:

PM> Install-Package ManualMapper

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 52 7/12/2019
1.0.1 288 3/9/2017