0

我正在尝试使用 Automapper 映射 2 种类型

var userRightInternal =  Mapper.Map<MibUserRight, UserRight>(userRight, 
    dest => dest.ConfigureMap().ForMember(p => p.PricingModel, m => m.Ignore()));

但我仍然收到以下错误:

错误映射类型

映射类型:MibUserRight -> UserRight GVP.Database.MibUserRight -> TvOpenPlatform.UserRights.Domain.Entities.UserRight

类型映射配置:MibUserRight -> UserRight GVP.Database.MibUserRight -> TvOpenPlatform.UserRights.Domain.Entities.UserRight

属性:定价模型

如果我告诉它忽略它,它为什么要尝试映射?

4

0 回答 0