Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 592 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 592 Bytes

AutoMapperExtender

Extensions for AutoMapper for .NET

How to Use

For each Mapper configuration call one of the methods in the AutoMapperExtender class.

To map a class with fewer or more properties to another:

Mapper.CreateMap<A, B>()
  .IgnoreExtraProperties();

Suppose you want to map from one object to another, but the bulk of the mapping is from a property of the source object.

To map from a property of the source object:

Mapper.CreateMap<A, B>()
  .FromSourceProperty(src => src.C);

This will map property C to object A