Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Automatically include base class mapping configurations #2000

@latonz

Description

@latonz

Add an option (e.g. bool MapperAttribute.AutoIncludeBaseMappings / [IncludeBaseMappingAttribute(bool)] to include base mapping configurations automatically.

[Mapper]
public partial class FruitMapper
{
    [MapProperty(nameof(FruitDto.A), nameof(Fruit.B))]
    private partial Fruit MapToFruit(FruitDto fruit);

    public partial Apple MapToApple(AppleDto apple);
}

When enabled and Apple* extends Fruit*, the configuration of MapToFruit should automatically also be applied to MapToApple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions