Beispiel #1
0
 /// <summary>
 ///     Removes the first occurrence of a specific object from the
 ///     <see cref="T:System.Collections.Generic.ICollection`1" />.
 /// </summary>
 /// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
 /// <returns>
 ///     true if <paramref name="item" /> was successfully removed from the
 ///     <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, false. This method also returns false if
 ///     <paramref name="item" /> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1" />.
 /// </returns>
 /// <exception cref="InvalidOperationException">Missing Alter or Setup statement of table</exception>
 public bool Remove(ILocalDbCheckConstraint <TEntity> item)
 {
     if (_localDbRepository.ReposetoryCreated)
     {
         throw new InvalidOperationException("Missing Alter or Setup statement of table");
     }
     return(_constraints.Remove(item));
 }
Beispiel #2
0
 /// <summary>
 ///     Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1" />.
 /// </summary>
 /// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
 /// <exception cref="InvalidOperationException">Missing Alter or Setup statement of table</exception>
 public void Add(ILocalDbCheckConstraint <TEntity> item)
 {
     if (_localDbRepository.ReposetoryCreated)
     {
         throw new InvalidOperationException("Missing Alter or Setup statement of table");
     }
     _constraints.Add(item);
 }
Beispiel #3
0
 /// <summary>
 ///     Determines whether the <see cref="T:System.Collections.Generic.ICollection`1" /> contains a specific value.
 /// </summary>
 /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
 /// <returns>
 ///     true if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />;
 ///     otherwise, false.
 /// </returns>
 public bool Contains(ILocalDbCheckConstraint <TEntity> item)
 {
     return(_constraints.Contains(item));
 }