private void TagContentItem(TagsPartRecord tagsPartRecord, string tagName) { var tagRecord = GetTagByName(tagName); var tagsContentItems = new ContentTagRecord { TagsPartRecord = tagsPartRecord, TagRecord = tagRecord }; _contentTagRepository.Create(tagsContentItems); }
private void TagContentItem(TagsPartRecord tagsPartRecord, string tagName) { var tagPart = _orchardServices.ContentManager.Get<TagsPart>(tagsPartRecord.Id, VersionOptions.Latest); tagPart.CurrentTags = tagPart.CurrentTags.Concat(new [] {tagName}); var tagRecord = GetTagByName(tagName); var tagsContentItems = new ContentTagRecord { TagsPartRecord = tagsPartRecord, TagRecord = tagRecord }; _contentTagRepository.Create(tagsContentItems); }