-
Hi, //source inheritance hierarchy
class SourceBase
{
public int Prop {get; set;}
}
class DerivedSource1: SourceBase { }
class DerivedSource2: SourceBase { }
//target inheritance hierarchy
class TargetBase
{
public int MappedProp {get; set;}
}
class DerivedTarget1: TargetBase{ }
class DerivedTarget2: TargetBase{ }
[Mapper]
public partial class BaseMapper
{
void Map(SourceBase source, TargetBase target)
}
[Mapper]
public partial class DerivedMapper1
{
void Map(DerivedSource1 source, DerivedTarget1 target) //how to reuse BaseMapper?
}
[Mapper]
public partial class DerivedMapper2
{
void Map(DerivedSource2 source, DerivedTarget2 target) //how to reuse BaseMapper?
} |
Beta Was this translation helpful? Give feedback.
Answered by
latonz
Feb 29, 2024
Replies: 1 comment
-
Duplicate of #1126 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Liero
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Duplicate of #1126