コード例 #1
0
        public static void Update(this TransferItem target, AbstractEntities.TransferItemUpdate source)
        {
            if (source == null || target == null)
            {
                return;
            }

            target.Discount = source.Discount;
            target.Name     = source.Name;
            target.Price    = source.Price;
        }
コード例 #2
0
        public static TransferItem ToDao(this AbstractEntities.TransferItemUpdate dto)
        {
            if (dto == null)
            {
                return(null);
            }

            return(new TransferItem
            {
                Discount = dto.Discount,
                Name = dto.Name,
                Price = dto.Price
            });
        }