Mapster. How to get specific member configuration?

I need to find source member (and its value) by destination name. As a workaround i could create temporary model object but obviously this is undesirable approach 😅

Example using AutoMapper

// validation omitted for brevity
var map = this._mapper.ConfigurationProvider.FindTypeMapFor<TDto, TModel>();

var dtoPrimaryKey = modelPrimaryKey.Properties
    .Select(x => map.GetPropertyMapByDestinationProperty(x.Name))
    .Select(x => x.SourceMembers.First().GetMemberValue(dto))
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum