Mapster icon indicating copy to clipboard operation
Mapster copied to clipboard

Unable to configure the custom mapping using "ConstructUsing"

Open Gopichandar opened this issue 2 years ago • 0 comments

I'm not able to map the following custom mapping and this possible with automapper. Any work around.

 config.NewConfig<List<MyResult>, MyResultDto>()
            .ConstructUsing(x => 
            {
              //do some custom stuff
               return new PcrResultDto()
               {
                   
               }
            });

Gopichandar avatar Aug 01 '22 08:08 Gopichandar

Use MapWith

goremykin avatar Aug 12 '22 08:08 goremykin

Thanks, @goremykin, is this documented somewhere (or) are there any samples available that I can refer to? I have a feeling that Mapster bit lack on documentation.

Gopichandar avatar Aug 12 '22 08:08 Gopichandar

@Gopichandar, Wiki

goremykin avatar Aug 12 '22 08:08 goremykin

Thanks alot @goremykin

Gopichandar avatar Aug 12 '22 08:08 Gopichandar