cezarypiatek / MappingGenerator

:arrows_counterclockwise: "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.mappinggenerator
MIT License
1.03k stars 120 forks source link

Mapping properties of one type on another #141

Closed marinasundstrom closed 3 years ago

marinasundstrom commented 4 years ago

I'm looking for something like this:


var form = new CarFormModel();
form = Map(details, form);

public static CarFormModel Map(ContactDetailsCar source, CarFormModel target) 
{ 
    // Do mapping here

    return carFormModel; // Return target
}
cezarypiatek commented 4 years ago

Please take a look at https://github.com/cezarypiatek/MappingGenerator/issues/93