コード例 #1
0
        public static ItemDiscountType Map(ItemDiscountTypeDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            return(new ItemDiscountType
            {
                Id = dto.DiscountId,
                DiscountPercentage = dto.DiscountPercentage,
                StartDate = dto.StartDate,
                EndDate = dto.EndDate,
                Amount = dto.Amount
            });
        }
コード例 #2
0
        public static ItemDiscountTypeViewModel Map(ItemDiscountTypeDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            return(new ItemDiscountTypeViewModel
            {
                DiscountId = dto.DiscountId,
                DiscountPercentage = dto.DiscountPercentage,
                StartDate = dto.StartDate,
                EndDate = dto.EndDate,
                Amount = dto.Amount,
                ItemId = dto.ItemId,
                RowVersion = dto.RowVersion,
            });
        }