Merge two objects to produce third using AutoMapper

前端 未结 5 1517
日久生厌
日久生厌 2020-12-14 01:25

I know it\'s AutoMapper and not AutoMerge(r), but...

I\'ve started using AutoMapper and have a need to Map A -> B, and to add some properties from C so that B become

5条回答
  •  囚心锁ツ
    2020-12-14 02:03

    Would this not work?

    var mappedB = _mapper.Map(aInstance);
    _mapper.Map(instanceC,mappedB);
    

提交回复
热议问题