public ActionResult SaveTag(Guid itemIdentifier, string tags) { if (Guid.Empty == itemIdentifier) { throw new ArgumentException("item idenfitier"); } if (string.IsNullOrWhiteSpace(tags)) { throw new ArgumentException(); } var userId = User.Identifier(); var save = new SocialTags() { ReferenceIdentifier = itemIdentifier, Tags = tags, UserIdentifier = userId, }; this.socialCore.SaveTags(save); var item = this.itemCore.GetItem(itemIdentifier, null, null, true); return(this.Redirect(ItemCore.BaseUrl(item.Key))); }
public void SaveTags(SocialTags tags) { if (null == tags) { throw new ArgumentNullException("tags"); } var sproc = new SocialSaveTags() { ReferenceIdentifier = tags.ReferenceIdentifier, Tags = tags.Tags, UserIdentifier = tags.UserIdentifier, }; sproc.Execute(); }
public void SaveTags(SocialTags tags) { if (null == tags) { throw new ArgumentNullException("tags"); } if (Guid.Empty == tags.ReferenceIdentifier) { throw new ArgumentException("Reference Identifier"); } if (string.IsNullOrWhiteSpace(tags.Tags)) { throw new ArgumentException("Tags must be specified"); } tags.UserIdentifier = User.Identifier(); this.socialCore.SaveTags(tags); }