-
Notifications
You must be signed in to change notification settings - Fork 0
Home
haiduc32 edited this page May 8, 2011
·
11 revisions
Welcome to the NextMap wiki!
NextMap is a tool to do auto mappings using convention over configuration. That means you can map objects with little or no code as long as their internals are similar, for example mapping from entities to DTOs. The common code that you'll end up writing for mapping will be something like:
CustomerDto transportCustomer = Mapper.Map<Customer, CustomerDto>(originalCustomer);You can read more about the NextMap philosophy for a better understanding of it's goals or just check the Getting Started page and go change the world!
Because it's the fastest implementation at the moment.
For now the NextMap supports very basic features. It will map members in classes automatically as long as the name is the same for supported type conversions. Features:
- for primitive types the types must be convertible.
- basic collection from System.Collections.Generic can be mapped to and from.
- arrays of same type will be just copied to destination
- string type members are converted without problems.
- any type of Enum will be mapped to any type of Enum.
- structures will be mapped if are the same type. For different types a mapping will have to be defined.
- for custom mappings only the top-level members can be set as source member.
- AssertConfigurationIsValid method to check that all destination members have a mapping rule and that all related configurations are defined.
- Unit Tests for code quality.
Not supported:
- mapping from decimal to any other type.
- mapping members of type Dictionary
- mapping arrays of one type to another.
- mapping internal types.
- supporting members of type Dictionary.
- making it even faster.
- enhancing the error reporting.
- supporting arrays.
- do Copy mappings.
- implement IgnoreMap and IgnoreCopyMap attributes.