我正在使用带有依赖注入的自动映射器,所以我有一些使用AutoMapper.Profile的映射器,我将给出我的问题的一个简化示例: public class FlavorProfile : Profilereturn fruit; } 配置文件: public class FruitProfile : Profile public FruitProfile () .Con
AssertConfigurationIsValid通过了,并且正在尝试的对象被完全填充,但是我在调用的第一个映射请求时得到了错误。Survey ToLoad = Mapper.Map<Survey>(U);//Lots of other Maps .ForMember(t => t.AccountType, s => s.MapFrom(so => so.Ac
我有3个类: A,B和C,其中A和B都应该转换为C,而A是B的包装器: public class C public int Id { get; set; }}
{ public B Data { get; set; }
} 我使用自动映射器配置文件类来创建映射对stackoverflow的搜索建议使用ConvertUsing