Mapster icon indicating copy to clipboard operation
Mapster copied to clipboard

Add Support for Conditional Access Expressions

Open j0nimost opened this issue 1 year ago • 0 comments

Currently, we cannot use conditional access expressions while declaring mappings. For example;

TypeAdapterConfig<ItemA, ItemB>.NewConfig()
    .Map(dest => dest.Name, src => src.ItemAChild?.Name);

The above example would fail with an error, however, conditional access is very common when mapping values. This is a needed feature.

j0nimost avatar May 15 '24 12:05 j0nimost