首页 > 移动平台 > 详细

ABP中mapping中忽略属性

时间:2018-09-02 22:37:23      阅读:426      评论:0      收藏:0      [点我收藏+]

创建一个XXXXProfile继承Profile,然后在构造函数中写忽略相关的,如下

 

public class ProductPriceDtoProfile: Profile
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public ProductPriceDtoProfile()
        {
            CreateMap<ProductInfo, ProductPriceDto>().ForMember(x => x.SalePrice, opt => opt.Ignore());

        }
    }

 

ABP中mapping中忽略属性

原文:https://www.cnblogs.com/albertay/p/9575667.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!