public void FromDto(DiscountDetailDTO dto) { if (dto == null) return; this.Id = dto.Id; this.Description = dto.Description ?? string.Empty; this.Amount = dto.Amount; }
//DTO public DiscountDetailDTO ToDto() { DiscountDetailDTO dto = new DiscountDetailDTO(); dto.Id = this.Id; dto.Description = this.Description ?? string.Empty; dto.Amount = this.Amount; return dto; }