public void FromDto(ShippableItemDTO dto) { this.ExtraShipFee = dto.ExtraShipFee; this.Height = dto.Height; this.IsNonShipping = dto.IsNonShipping; this.Length = dto.Length; this.ShippingScheduleId = dto.ShippingScheduleId; this.ShippingSource = (ShippingMode)((int)dto.ShippingSource); this.ShippingSourceId = dto.ShippingSourceId ?? string.Empty; this.ShipSeparately = dto.ShipSeparately; this.Weight = dto.Weight; this.Width = dto.Width; }
public ShippableItemDTO ToDto() { ShippableItemDTO dto = new ShippableItemDTO(); dto.ExtraShipFee = this.ExtraShipFee; dto.Height = this.Height; dto.IsNonShipping = this.IsNonShipping; dto.Length = this.Length; dto.ShippingScheduleId = this.ShippingScheduleId; dto.ShippingSource = (ShippingModeDTO)((int)this.ShippingSource); dto.ShippingSourceId = this.ShippingSourceId; dto.ShipSeparately = this.ShipSeparately; dto.Weight = this.Weight; dto.Width = this.Width; return dto; }