Skip to content

The ReverseMap parameter names are misleading #24265

@ejohnson-dotnet

Description

@ejohnson-dotnet

Is there an existing issue for this?

  • I have searched the existing issues

Description

The new Mapperly object mapper module has the abstract base class TwoWayMapperBase and some associated ReverseMap methods. The parameter names are misleading. When the object is reverse mapped, the TDestination object is copied to the TSource

Therefore the parameters should be named TDestination source and TSource destination like so:

public abstract class TwoWayMapperBase<TSource, TDestination> : MapperBase<TSource, TDestination>, IAbpReverseMapperlyMapper<TSource, TDestination>
{
    public abstract TSource ReverseMap(TDestination source);

    public abstract void ReverseMap(TDestination source, TSource destination);

    public virtual void BeforeReverseMap(TDestination source)
    {
    }

    public virtual void AfterReverseMap(TDestination source, TSource destination)
    {
    }
}

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

10.0.0

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions