- 默认情况下,AutoMapper 基于相同的字段名映射,并且是 不区分大小写 的
var config = new MapperConfiguration(cfg =>
{
cfg.CreateMap<Foo, FooDto>();
cfg.SourceMemberNamingConvention = new PascalCaseNamingConvention();
cfg.DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention();
});