Пример #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);
        }
Пример #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;

        }
Пример #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;
     }
 }
Пример #4
0
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="marketingCampaign"></param>
 public MarketingCampaignDto(MarketingCampaign marketingCampaign)
 {
     CopyFromModel(marketingCampaign);
 }
Пример #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));
 }