Open source (free) Object mapping software for .Net
We're needing to map between one object and another, i.e. obj1.property1 needs to map to obj2.property3 and obj1.property2 needs to map to obj.property1, etc.
I know there are open 开发者_如何学编程source frameworks for Java like Dozer.
Are there any .Net ones out there?
AutoMapper:
A convention-based object-object mapper.
AutoMapper uses a fluent configuration API to define an object-object mapping strategy. AutoMapper uses a convention-based matching algorithm to match up source to destination values. Currently, AutoMapper is geared towards model projection scenarios to flatten complex object models to DTOs and other simple objects, whose design is better suited for serialization, communication, messaging, or simply an anti-corruption layer between the domain and application layer.
UltraMapper is a stable alternative to the well-known AutoMapper. It was developed to deal with some AutoMapper limitations and it is much faster than AutoMapper. Give it a try.
It is currently actively developed.
Project link: https://github.com/maurosampietro/UltraMapper
Nuget package: https://www.nuget.org/packages/UltraMapper/
精彩评论