public bool SetVersionManagerRecord(VersionManagerRecord record)
        {
            if (record.ContentItemId == 0 || record.ContentItemVersionId == 0)
            {
                return false;
            }

            //Resolve current record if exist
            VersionManagerRecord newRecord = VersionManagerRecords.FirstOrDefault(r => r.ContentItemId == record.ContentItemId && r.ContentItemVersionId == record.ContentItemVersionId) ?? new VersionManagerRecord();
            newRecord.ContentItemId = record.ContentItemId;
            newRecord.ContentItemVersionId = record.ContentItemVersionId;
            if (!String.IsNullOrEmpty(record.Description))
            {
                newRecord.Description = record.Description;
            }
            _versionManagerRecords.Update(newRecord);
            _signals.Trigger(VersionManagerCache);
            return true;
        }
        public bool SetDescriptionPost(SetDescriptionPostInputModel inputModel)
        {
            VersionManagerRecord record = new VersionManagerRecord
            {
                ContentItemId = inputModel.ContentItemId,
                ContentItemVersionId = inputModel.ContentItemVersionId,
                Description = inputModel.Description,
                Id = inputModel.Id
            };

            if (_versionManagerDataService.SetVersionManagerRecord(record))
            {
                _notifier.Information(T("Versionmanager information updated."));
                return false;
            }

            _notifier.Error(
                T("Could not update VersionManagerRecord. Make sure that contentItemId or ContentItemVersionId is 0"));
            return true;
        }
        public SetDescriptionViewModel SetDescription(int id, int versionId)
        {
            VersionManagerRecord existingInfo =
                _versionManagerInfoDataService.VersionManagerRecords.FirstOrDefault(
                    r => r.ContentItemId == id && r.ContentItemVersionId == versionId);

            VersionManagerRecord versionManagerRecord = new VersionManagerRecord();
            if (existingInfo != null)
            {
                versionManagerRecord.Description = existingInfo.Description;
            }
            versionManagerRecord.ContentItemId = id;
            versionManagerRecord.ContentItemVersionId = versionId;

            SetDescriptionViewModel viewModel = new SetDescriptionViewModel
            {
                ContentItemId = versionManagerRecord.ContentItemId,
                ContentItemVersionId = versionManagerRecord.ContentItemVersionId,
                Description = versionManagerRecord.Description,
                Id = versionManagerRecord.Id
            };

            return viewModel;
        }