/// <summary> /// Allows you to convert the current affiliate contact object to the DTO equivalent for use with the REST API /// </summary> /// <returns>A new instance of AffiliateContactDTO</returns> public AffiliateContactDTO ToDto() { var dto = new AffiliateContactDTO(); dto.Id = Id; dto.AffiliateId = AffiliateId; dto.UserId = UserId; dto.StoreId = StoreId; return(dto); }
//DTO public AffiliateContactDTO ToDto() { AffiliateContactDTO dto = new AffiliateContactDTO(); dto.Id = this.Id; dto.AffiliateId = this.AffiliateId; dto.UserId = this.UserId; dto.StoreId = this.StoreId; return(dto); }
/// <summary> /// Allows you to populate the current affiliate contact object using an AffiliateContactDTO instance /// </summary> /// <param name="dto">An instance of the affiliate contact from the REST API</param> public void FromDto(AffiliateContactDTO dto) { if (dto == null) { return; } Id = dto.Id; AffiliateId = dto.AffiliateId; UserId = dto.UserId; StoreId = dto.StoreId; }