AutoMapper: setup member name matching convention
- by epitka
I tried setting up a member name mapping convention so that the source members ending with a "Id" are mapped to destination members without Id. For example
UserId - User
How does one do this? I tried using SourceMemberNameTransformer without success. Also tried using RecognizePostfixes().
this.SourceMemberNameTransformer = s =>
{
return s.Replace("Id", string.Empty);
};