public static CustomerDiscountType Map(CustomerDiscountTypeDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            return(new CustomerDiscountType
            {
                Id = dto.Id,
                Name = dto.Name,
                Active = dto.active,
                DiscountPercent = dto.DiscountPercent
            });
        }
Esempio n. 2
0
        public static CustomerDiscountTypeViewModel Map(CustomerDiscountTypeDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            return(new CustomerDiscountTypeViewModel
            {
                Id = dto.Id,
                Name = dto.Name,
                Active = dto.active,
                DiscountPercent = dto.DiscountPercent,
                Rowversion = dto.Rowversion
            });
        }