Replies: 1 comment
-
Hey, thanks for your question. While Mapperly doesn't explicitly support multiple source mapping, it is possible to implement this. Instead you could try chaining together two existing target mappers like so: [Mapper]
public static partial class Mapper
{
private static partial Target MapSource1(Source1 src);
private static partial void MapSource2(Source2 src, Target trg);
public static Target Combine(Source1 src1, Source2 src2)
{
var target = MapSource1(src1);
MapSource2(src2, target);
return target;
}
} It's a bit verbose and won't work with Hope this helps 😄 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to map from multiple source objects?
I presume no as I'm not sure how that would work.
Beta Was this translation helpful? Give feedback.
All reactions