public INotificationMessage BuildEntity(NotificationMessageDto dto)
        {
            var notification = new NotificationMessage(dto.MethodKey, dto.Name)
            {
                Key               = dto.Key,
                Description       = dto.Description,
                Message           = dto.Message,
                MaxLength         = dto.MaxLength,
                Recipients        = dto.Recipients,
                MessageIsFilePath = dto.MessageIsFilePath,
                SendToCustomer    = dto.SendToCustomer,
                Disabled          = dto.Disabled,
                UpdateDate        = dto.UpdateDate,
                CreateDate        = dto.CreateDate
            };

            notification.ResetDirtyProperties();

            return(notification);
        }
Example #2
0
        public INotificationMessage BuildEntity(NotificationMessageDto dto)
        {
            var notification = new NotificationMessage(dto.MethodKey, dto.Name, dto.FromAddress)
            {
                Key                = dto.Key,
                Description        = dto.Description,
                BodyText           = dto.BodyText,
                ReplyTo            = dto.ReplyTo,
                MonitorKey         = dto.MonitorKey,
                MaxLength          = dto.MaxLength == 0 ? int.MaxValue : dto.MaxLength,
                Recipients         = dto.Recipients,
                BodyTextIsFilePath = dto.BodyTextIsFilePath,
                SendToCustomer     = dto.SendToCustomer,
                Disabled           = dto.Disabled,
                UpdateDate         = dto.UpdateDate,
                CreateDate         = dto.CreateDate
            };

            notification.ResetDirtyProperties();

            return(notification);
        }