public void DeleteVocabulary(Vocabulary vocabulary) { //Argument Contract Requires.NotNull("vocabulary", vocabulary); Requires.PropertyNotNegative("vocabulary", "VocabularyId", vocabulary.VocabularyId); _DataService.DeleteVocabulary(vocabulary); //Refresh Cache DataCache.RemoveCache(_CacheKey); }
public void UpdateVocabulary(Vocabulary vocabulary) { //Argument Contract Requires.NotNull("vocabulary", vocabulary); Requires.PropertyNotNegative("vocabulary", "VocabularyId", vocabulary.VocabularyId); Requires.PropertyNotNullOrEmpty("vocabulary", "Name", vocabulary.Name); //Refresh Cache DataCache.RemoveCache(_CacheKey); _DataService.UpdateVocabulary(vocabulary, UserController.GetCurrentUserInfo().UserID); }
public int AddVocabulary(Vocabulary vocabulary) { //Argument Contract Requires.NotNull("vocabulary", vocabulary); Requires.PropertyNotNullOrEmpty("vocabulary", "Name", vocabulary.Name); Requires.PropertyNotNegative("vocabulary", "ScopeTypeId", vocabulary.ScopeTypeId); vocabulary.VocabularyId = _DataService.AddVocabulary(vocabulary, UserController.GetCurrentUserInfo().UserID); //Refresh Cache DataCache.RemoveCache(_CacheKey); return vocabulary.VocabularyId; }
public void UpdateVocabulary(Vocabulary vocabulary, int lastModifiedByUserId) { provider.ExecuteNonQuery("UpdateVocabulary", vocabulary.VocabularyId, vocabulary.Type, vocabulary.Name, vocabulary.Description, vocabulary.Weight, vocabulary.ScopeId, vocabulary.ScopeTypeId, lastModifiedByUserId); }
public void DeleteVocabulary(Vocabulary vocabulary) { provider.ExecuteNonQuery("DeleteVocabulary", vocabulary.VocabularyId); }
public int AddVocabulary(Vocabulary vocabulary, int createdByUserId) { return provider.ExecuteScalar<int>("AddVocabulary", vocabulary.Type, vocabulary.Name, vocabulary.Description, vocabulary.Weight, provider.GetNull(vocabulary.ScopeId), vocabulary.ScopeTypeId, createdByUserId); }