AutoMapper映射子表

CreateMap<Temp_ProductImage, ProductImage>()
                .ForMember(x => x.Id, opt => opt.Ignore());

CreateMap<Temp_Product, Product>()
                .ForMember(x => x.ProductImageList, opt => opt.MapFrom(src => src.Temp_ProductImageList));

  

posted @ 2020-10-27 22:07  yomi丶  阅读(228)  评论(0编辑  收藏  举报