/// <summary> /// To the model. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static MarketingCampaignAudience ToModel(this MarketingCampaignAudienceDto value) { MarketingCampaignAudience result = new MarketingCampaignAudience(); value.CopyToModel(result); return(result); }
/// <summary> /// Copies the properties from another MarketingCampaignAudience object to this MarketingCampaignAudience object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this MarketingCampaignAudience target, MarketingCampaignAudience source) { target.MarketingCampaignId = source.MarketingCampaignId; target.AudienceTypeValueId = source.AudienceTypeValueId; target.IsPrimary = source.IsPrimary; target.Id = source.Id; target.Guid = source.Guid; }
/// <summary> /// Clones this MarketingCampaignAudience object to a new MarketingCampaignAudience object /// </summary> /// <param name="source">The source.</param> /// <param name="deepCopy">if set to <c>true</c> a deep copy is made. If false, only the basic entity properties are copied.</param> /// <returns></returns> public static MarketingCampaignAudience Clone(this MarketingCampaignAudience source, bool deepCopy) { if (deepCopy) { return(source.Clone() as MarketingCampaignAudience); } else { var target = new MarketingCampaignAudience(); target.CopyPropertiesFrom(source); return(target); } }
/// <summary> /// Instantiates a new DTO object from the entity /// </summary> /// <param name="marketingCampaignAudience"></param> public MarketingCampaignAudienceDto(MarketingCampaignAudience marketingCampaignAudience) { CopyFromModel(marketingCampaignAudience); }
/// <summary> /// To the dto. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static MarketingCampaignAudienceDto ToDto(this MarketingCampaignAudience value) { return(new MarketingCampaignAudienceDto(value)); }