public void AddTermToContent(Term term, ContentItem contentItem)
        {
            //Argument Contract
            Requires.NotNull("term", term);
            Requires.NotNull("contentItem", contentItem);

            _DataService.AddTermToContent(term, contentItem);
        }
        public void DeleteTerm(Term term)
        {
            //Argument Contract
            Requires.NotNull("term", term);
            Requires.PropertyNotNegative("term", "TermId", term.TermId);

            //if ((term.IsHeirarchical))
            //{
            //    _DataService.DeleteHeirarchicalTerm(term);
            //}
            //else
            //{
            //    _DataService.DeleteSimpleTerm(term);
            //}

            //Clear Cache
            DataCache.RemoveCache(string.Format(_CacheKey, term.VocabularyId));
        }
        public int AddTerm(Term term)
        {
            //Argument Contract
            Requires.NotNull("term", term);
            Requires.PropertyNotNegative("term", "VocabularyId", term.VocabularyId);
            Requires.PropertyNotNullOrEmpty("term", "Name", term.Name);

            //if ((term.IsHeirarchical))
            //{
            //    term.TermId = _DataService.AddHeirarchicalTerm(term, UserController.GetCurrentUserInfo().UserID);
            //}
            //else
            //{
            //    term.TermId = _DataService.AddSimpleTerm(term, UserController.GetCurrentUserInfo().UserID);
            //}

            //Clear Cache
            DataCache.RemoveCache(string.Format(_CacheKey, term.VocabularyId));

            return term.TermId;
        }
 public void UpdateSimpleTerm(Term term, int lastModifiedByUserId)
 {
     provider.ExecuteNonQuery("UpdateSimpleTerm", term.TermId, term.VocabularyId, term.Name, term.Description, term.Weight, lastModifiedByUserId);
 }
 public void DeleteHeirarchicalTerm(Term term)
 {
     provider.ExecuteNonQuery("DeleteHeirarchicalTerm", term.TermId);
 }
 public void DeleteSimpleTerm(Term term)
 {
     provider.ExecuteNonQuery("DeleteSimpleTerm", term.TermId);
 }
 public void AddTermToContent(Term term, ContentItem contentItem)
 {
     provider.ExecuteNonQuery("AddTermToContent", term.TermId, contentItem.ContentItemId);
 }
 public int AddSimpleTerm(Term term, int createdByUserId)
 {
     return provider.ExecuteScalar<int>("AddSimpleTerm", term.VocabularyId, term.Name, term.Description, term.Weight, createdByUserId);
 }
 public int AddHeirarchicalTerm(Term term, int createdByUserId)
 {
     return provider.ExecuteScalar<int>("AddHeirarchicalTerm", term.VocabularyId, term.ParentTermId, term.Name, term.Description, term.Weight, createdByUserId);
 }