Inheritance: Orchard.ContentManagement.Records.ContentPartRecord
コード例 #1
0
ファイル: TagService.cs プロジェクト: Zlatinsz/podnebeto
 private void UntagContentItem(TagsPartRecord tagsPartRecord, string tagName)
 {
     var tagPart = _orchardServices.ContentManager.Get<TagsPart>(tagsPartRecord.Id, VersionOptions.Latest);
     tagPart.CurrentTags = tagPart.CurrentTags.Where(x => x != tagName);
 }
コード例 #2
0
 private void TagContentItem(TagsPartRecord tagsPartRecord, string tagName) {
     var tagRecord = GetTagByName(tagName);
     var tagsContentItems = new ContentTagRecord { TagsPartRecord = tagsPartRecord, TagRecord = tagRecord };
     _contentTagRepository.Create(tagsContentItems);
 }
コード例 #3
0
ファイル: TagService.cs プロジェクト: Zlatinsz/podnebeto
 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);
 }