public void CreateLocalMessage()
 {
     if (_changeType == EntityChangeType.None)
     {
         return;
     }
     foreach (var startEvent in LocalMessageStore.GetLocalMessageStartEvents(_userConnection))
     {
         if (!IsSchemaMatch(startEvent.EntitySchemaUId))
         {
             continue;
         }
         if (!IsChangeTypeMatch(startEvent.RecordChangeType))
         {
             continue;
         }
         if (!IsChangedColumnsMatch(startEvent.ChangedColumns))
         {
             continue;
         }
         if (!IsConditionDataMatch(startEvent.ConditionData))
         {
             continue;
         }
         AppendMessage(startEvent);
         InsertLocalMessage();
     }
 }
        private void AppendMessage(LocalMessageStartEvent startEvent)
        {
            var result            = new List <object>();
            var sb                = new StringBuilder();
            var lmColumnTemplates = LocalMessageStore.GetLocalMessageColumnTemplates(_userConnection);

            foreach (var column in lmColumnTemplates.Where(item => item.LMStartEventId == startEvent.Id).OrderBy(t => t.Position))
            {
                if (column.IsLink)
                {
                    result.Add(CreateLink(column.ColumnName));
                }
                else
                {
                    result.AddRange(GetColumnValues(column));
                }
            }
            _message = sb.AppendFormat(startEvent.MessageTemplate, result.ToArray()).ToString();
        }