Skip to content
A quick object-object mapper for .NET
C# HTML PowerShell Other
Branch: master
Clone or download

Latest commit

Latest commit 0aa6f8b Dec 8, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuget nuget update Aug 11, 2017
Site * index updated measurements Sep 26, 2015
Source updated version Dec 8, 2019
Tools nuget update Aug 11, 2017
packages - TargetTypeMarker Jan 15, 2015
.gitignore benchmark Aug 13, 2017
CONTRIBUTING.markdown removed gg Jun 6, 2016
FactTest.msbuild * xunit -> 1.9.2. 2.0 doesn't work with .net 3.5 Apr 12, 2015
GlobalAssemblyInfo.cs nuget update Aug 11, 2017
LICENSE + tinymapper.nuspec Mar 4, 2015
NuGet.msbuild * All added support .Net 3.0 Jun 24, 2015
README.md readme Aug 12, 2017
Root.msbuild * fixed target Depends Jun 24, 2015
TinyMapper.sln - Test35 Apr 10, 2018
TinyMapper.sln.DotSettings fixed #78 Dec 8, 2019
restore.cmd + tinymapper.nuspec Mar 4, 2015

README.md

TinyMapper - a quick object mapper for .Net

Nuget downloads GitHub license GitHub license

Performance Comparison

Performance Comparison

Installation

Available on nuget

PM> Install-Package TinyMapper

Getting Started

TinyMapper.Bind<Person, PersonDto>();

var person = new Person
{
	Id = Guid.NewGuid(),
	FirstName = "John",
	LastName = "Doe"
};

var personDto = TinyMapper.Map<PersonDto>(person);

Ignore mapping source members and bind members with different names/types

TinyMapper.Bind<Person, PersonDto>(config =>
{
	config.Ignore(x => x.Id);
	config.Ignore(x => x.Email);
	config.Bind(source => source.LastName, target => target.Surname);
	config.Bind(target => source.Emails, typeof(List<string>));
});

var person = new Person
{
	Id = Guid.NewGuid(),
	FirstName = "John",
	LastName = "Doe",
	Emails = new List<string>{"support@tinymapper.net", "MyEmail@tinymapper.net"}
};

var personDto = TinyMapper.Map<PersonDto>(person);

TinyMapper supports the following platforms:

What to read

Contributors

A big thanks to all of TinyMapper's contributors:

You can’t perform that action at this time.