I need to configure a custom mapping between two generic classes using Mapster.
public class Source<T>
{
public T Value { get; set; }
}
public class Destination<T>
{
public T Value { get; set; }
}
I made the following attempts but the syntax is not correct:
TypeAdapterConfig<Source<>, Destination<>>.NewConfig()
.Map(dest => dest.Value, src => src.Value);
TypeAdapterConfig<Source<T>, Destination<T>>.NewConfig()
.Map(dest => dest.Value, src => src.Value);
I searched for an answer and read the Mapster documentation, but couldn't find a solution. Is this a limitation of the mapping library? Is there any way to do this kind of mapping?