abp icon indicating copy to clipboard operation
abp copied to clipboard

The ReverseMap parameter names are misleading

Open ejohnson-dotnet opened this issue 2 months ago • 0 comments

Is there an existing issue for this?

  • [x] 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

ejohnson-dotnet avatar Nov 24 '25 22:11 ejohnson-dotnet