Exemplo n.º 1
0
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static MarketingCampaign ToModel(this MarketingCampaignDto value)
        {
            MarketingCampaign result = new MarketingCampaign();

            value.CopyToModel(result);
            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Copies the properties from another MarketingCampaign object to this MarketingCampaign object
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="source">The source.</param>
        public static void CopyPropertiesFrom( this MarketingCampaign target, MarketingCampaign source )
        {
            target.Title = source.Title;
            target.ContactPersonId = source.ContactPersonId;
            target.ContactEmail = source.ContactEmail;
            target.ContactPhoneNumber = source.ContactPhoneNumber;
            target.ContactFullName = source.ContactFullName;
            target.EventGroupId = source.EventGroupId;
            target.Id = source.Id;
            target.Guid = source.Guid;

        }
Exemplo n.º 3
0
 /// <summary>
 /// Clones this MarketingCampaign object to a new MarketingCampaign 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 MarketingCampaign Clone( this MarketingCampaign source, bool deepCopy )
 {
     if (deepCopy)
     {
         return source.Clone() as MarketingCampaign;
     }
     else
     {
         var target = new MarketingCampaign();
         target.CopyPropertiesFrom( source );
         return target;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="marketingCampaign"></param>
 public MarketingCampaignDto(MarketingCampaign marketingCampaign)
 {
     CopyFromModel(marketingCampaign);
 }
Exemplo n.º 5
0
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static MarketingCampaignDto ToDto(this MarketingCampaign value)
 {
     return(new MarketingCampaignDto(value));
 }