AutoMapper / AutoMapper.Extensions.ExpressionMapping

MIT License
143 stars 39 forks source link

Extensions incorrectly target `IMapper` instead of `IMapperBase` preventing usage in converters #172

Closed betmix-matt closed 1 year ago

betmix-matt commented 1 year ago

Currently the MapperExtensions.cs use the IMapper interface as the type for all this functions in the class.

While this works for the majority of use cases, if you have access to an IRuntimeMapper only from the ResolutionContext, you cannot use these extension methods.

If instead this class is changed so the functions instead use IMapperBase as the this type, it should work for both use cases.