All Projects → MapsterMapper → Mapster

MapsterMapper / Mapster

Licence: mit
A fast, fun and stimulating object to object Mapper

Projects that are alternatives of or similar to Mapster

JSONUtilities
Easily load JSON objects and decode them into structs or classes
Stars: ✭ 57 (-95.85%)
Mutual labels:  mapping, mapper
Batmap
🦇 Convention-based, fast object mapper.
Stars: ✭ 210 (-84.73%)
Mutual labels:  mapper, mapping
Bull
BULL - Bean Utils Light Library
Stars: ✭ 150 (-89.09%)
Mutual labels:  mapper, mapping
Mappinggenerator
🔄 "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
Stars: ✭ 831 (-39.56%)
Mutual labels:  mapper, mapping
Poiji
🍬 A tiny library converting excel rows to a list of Java objects based on Apache POI
Stars: ✭ 255 (-81.45%)
Mutual labels:  mapper, mapping
awesome-maps-ukraine
A curated list of maps of Ukraine, ukrainian mappers and tools that they use or develop for creating and publish maps
Stars: ✭ 35 (-97.45%)
Mutual labels:  mapping, mapper
Jmapper Core
Elegance, high performance and robustness all in one java bean mapper
Stars: ✭ 159 (-88.44%)
Mutual labels:  mapper, mapping
orika-spring-boot-starter
Spring Boot Starter for Orika.
Stars: ✭ 116 (-91.56%)
Mutual labels:  mapping, mapper
Agilemapper
A zero-configuration, highly-configurable, unopinionated object mapper with viewable execution plans. Flattens, unflattens, deep clones, merges, updates and projects queries. Targets .NET 3.5+ and .NET Standard 1.0+
Stars: ✭ 345 (-74.91%)
Mutual labels:  mapper, mapping
Object Mapper
ObjectMapper is a class for automatic object mapping in Python
Stars: ✭ 72 (-94.76%)
Mutual labels:  mapper, mapping
Mapstruct Kotlin
Using mapstruct with kotlin data classes.
Stars: ✭ 84 (-93.89%)
Mutual labels:  mapper
Covid Charts
A collection of JavaScript-based data visualization tools and data for depicting spread of the COVID-19
Stars: ✭ 88 (-93.6%)
Mutual labels:  mapping
Vex Hugo
Vex is a product landing page theme/template created by Themefisher based on the latest Bootstrap 4 framework. It is fully responsive and beautifully crafted with Product Showcase, Testimonials, and Email Subscription sections
Stars: ✭ 97 (-92.95%)
Mutual labels:  fast
Eao Slam
[IROS 2020] EAO-SLAM: Monocular Semi-Dense Object SLAM Based on Ensemble Data Association
Stars: ✭ 95 (-93.09%)
Mutual labels:  mapping
Ofxfontstash
Easy (and fast) unicode string rendering addon for OpenFrameworks. FontStash is made by Andreas Krinke and Mikko Mononen
Stars: ✭ 84 (-93.89%)
Mutual labels:  fast
Bughunter
Tools for Bug Hunting
Stars: ✭ 95 (-93.09%)
Mutual labels:  mapping
Mrpt slam
ROS wrappers for SLAM algorithms in MRPT
Stars: ✭ 84 (-93.89%)
Mutual labels:  mapping
Ourbatis
Enhancement tools that make the development of Mybatis easier.
Stars: ✭ 84 (-93.89%)
Mutual labels:  mapper
Genesis
Spring cloud Example
Stars: ✭ 83 (-93.96%)
Mutual labels:  mapper
Cn sort
中文排序:按拼音/笔顺快速排序简体中文词组(百万数量级,可含中英/多音字)。如果对您有所帮助,欢迎点个star鼓励一下。
Stars: ✭ 102 (-92.58%)
Mutual labels:  fast

Mapster Icon

Mapster - The Mapper of Your Domain

Writing mapping methods is a machine job. Do not waste your time, let Mapster do it.

NuGet

Get it

PM> Install-Package Mapster

Basic usage

Mapping to a new object

Mapster creates the destination object and maps values to it.

var destObject = sourceObject.Adapt<Destination>();

Mapping to an existing object

You create the object, Mapster maps to the object.

sourceObject.Adapt(destObject);

Queryable Extensions

Mapster also provides extensions to map queryables.

using (MyDbContext context = new MyDbContext())
{
    // Build a Select Expression from DTO
    var destinations = context.Sources.ProjectToType<Destination>().ToList();

    // Versus creating by hand:
    var destinations = context.Sources.Select(c => new Destination {
        Id = p.Id,
        Name = p.Name,
        Surname = p.Surname,
        ....
    })
    .ToList();
}

Generating models & mappers

No need to write your own DTO classes. Mapster provides Mapster.Tool to help you generating models. And if you would like to have explicit mapping, Mapster also generates mapper class for you.

[AdaptTo("[name]Dto"), GenerateMapper]
public class Student {
    ...
}

Then Mapster will generate:

public class StudentDto {
    ...
}
public static class StudentMapper {
    public static StudentDto AdaptToDto(this Student poco) { ... }
    public static StudentDto AdaptTo(this Student poco, StudentDto dto) { ... }
    public static Expression<Func<Student, StudentDto>> ProjectToDto => ...
}

What's new

Why Mapster?

Performance & Memory efficient

Mapster was designed to be efficient on both speed and memory. You could gain a 4x performance improvement whilst using only 1/3 of memory. And you could gain up to 12x faster performance with

Method Mean StdDev Error Gen 0 Gen 1 Gen 2 Allocated
'Mapster 6.0.0' 108.59 ms 1.198 ms 1.811 ms 31000.0000 - - 124.36 MB
'Mapster 6.0.0 (Roslyn)' 38.45 ms 0.494 ms 0.830 ms 31142.8571 - - 124.36 MB
'Mapster 6.0.0 (FEC)' 37.03 ms 0.281 ms 0.472 ms 29642.8571 - - 118.26 MB
'Mapster 6.0.0 (Codegen)' 34.16 ms 0.209 ms 0.316 ms 31133.3333 - - 124.36 MB
'ExpressMapper 1.9.1' 205.78 ms 5.357 ms 8.098 ms 59000.0000 - - 236.51 MB
'AutoMapper 10.0.0' 420.97 ms 23.266 ms 35.174 ms 87000.0000 - - 350.95 MB

Step into debugging

Step-into debugging lets you debug your mapping and inspect values just like your code. image

Code Generation

Code generation allows you to

  • Validate mapping at compile time
  • Getting raw performance
  • Seeing your mapping code & debugging
  • Finding usage of your models' properties

There are currently two tools which you can choose based on your preferences.

Change logs

https://github.com/MapsterMapper/Mapster/releases

Usages

https://github.com/MapsterMapper/Mapster/wiki

Acknowledgements

JetBrains kindly provides Mapster with a free open-source licence for their Resharper and Rider.

  • Resharper makes Visual Studio a much better IDE
  • Rider is fast & powerful cross platform .NET IDE

image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].