题
使用此配置有关使用FlatteringConfig从EmitMapper样本使用时,不会调用自定义转换器的某些配置。使用defaultmapconfig时调用它。
配置:
var userMapper = ObjectMapperManager.DefaultInstance.GetMapper<User, UserModel>(
new FlatteringConfig().ConvertGeneric(typeof(IList<>), typeof(IList<>),
new DefaultCustomConverterProvider(typeof(EntityListToModelListConverter<,>))));
.
关于潜在原因的任何想法?
解决方案
看下面的答案
解决方案
Because FlatteringConfig overrides GetMappingOperations
function it is not calling FilterOpertations
functions, which assigns custom converters. So adding FilterOperations
function call to the GetMappingOperations
solved the problem.
不隶属于 StackOverflow