public void DeleteScopeType(ScopeType scopeType) { //Argument Contract Requires.NotNull("scopeType", scopeType); Requires.PropertyNotNegative("scopeType", "ScopeTypeId", scopeType.ScopeTypeId); _DataService.DeleteScopeType(scopeType); //Refresh cached collection of types DataCache.RemoveCache(DataCache.ScopeTypesCacheKey); }
public int AddScopeType(ScopeType scopeType) { //Argument Contract Requires.NotNull("scopeType", scopeType); Requires.PropertyNotNullOrEmpty("scopeType", "ScopeType", scopeType.ScopeType); scopeType.ScopeTypeId = _DataService.AddScopeType(scopeType); //Refresh cached collection of types DataCache.RemoveCache(DataCache.ScopeTypesCacheKey); return(scopeType.ScopeTypeId); }
public int AddScopeType(ScopeType scopeType) { //Argument Contract Requires.NotNull("scopeType", scopeType); Requires.PropertyNotNullOrEmpty("scopeType", "ScopeType", scopeType.ScopeType); scopeType.ScopeTypeId = _DataService.AddScopeType(scopeType); //Refresh cached collection of types DataCache.RemoveCache(_CacheKey); return scopeType.ScopeTypeId; }
public void DataService_AddScopeType_Adds_Record_On_Valid_ScopeType() { //Arrange int rowCount = DataUtil.GetRecordCount(DataTestHelper.ConnectionString, ContentDataTestHelper.ScopeTypesTableName); DataUtil.AddDatabaseObject(virtualScriptFilePath, addScopeType); ScopeType scopeType = new ScopeType(); scopeType.ScopeType = Constants.SCOPETYPE_ValidScopeType; DataService ds = new DataService(); //Act int scopeTypeItemId = ds.AddScopeType(scopeType); //Assert DatabaseAssert.RecordCountIsEqual(DataTestHelper.ConnectionString, ContentDataTestHelper.ScopeTypesTableName, rowCount + 1); }
internal static ScopeType CreateValidScopeType() { ScopeType scopeType = new ScopeType {ScopeType = Constants.SCOPETYPE_ValidScopeType}; return scopeType; }
/// <summary> /// Updates the type of the scope. /// </summary> /// <param name="scopeType">Type of the scope.</param> public void UpdateScopeType(ScopeType scopeType) { _provider.ExecuteNonQuery("UpdateScopeType", scopeType.ScopeTypeId, scopeType.ScopeType); }
/// <summary> /// Deletes the type of the scope. /// </summary> /// <param name="scopeType">Type of the scope.</param> public void DeleteScopeType(ScopeType scopeType) { _provider.ExecuteNonQuery("DeleteScopeType", scopeType.ScopeTypeId); }
/// <summary> /// Adds the type of the scope. /// </summary> /// <param name="scopeType">Type of the scope.</param> /// <returns>scope type id.</returns> public int AddScopeType(ScopeType scopeType) { return _provider.ExecuteScalar<int>("AddScopeType", scopeType.ScopeType); }
public void DeleteScopeType(ScopeType scopeType) { //Argument Contract Requires.NotNull("scopeType", scopeType); Requires.PropertyNotNegative("scopeType", "ScopeTypeId", scopeType.ScopeTypeId); _DataService.DeleteScopeType(scopeType); //Refresh cached collection of types DataCache.RemoveCache(_CacheKey); }
public int AddScopeType(ScopeType scopeType) { return Constants.SCOPETYPE_AddScopeTypeId; }
public void UpdateScopeType(ScopeType scopeType) { }
public void DeleteScopeType(ScopeType scopeType) { }