Esempio n. 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(ILocalDbUniqueConstraint <TEntity> item)
 {
     if (_localDbRepository.ReposetoryCreated)
     {
         throw new InvalidOperationException("Missing Alter or Setup statement of table");
     }
     return(_constraints.Remove(item));
 }
Esempio n. 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(ILocalDbUniqueConstraint <TEntity> item)
 {
     if (_localDbRepository.ReposetoryCreated)
     {
         throw new InvalidOperationException("Missing Alter or Setup statement of table");
     }
     _constraints.Add(item);
 }
Esempio n. 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(ILocalDbUniqueConstraint <TEntity> item)
 {
     return(_constraints.Contains(item));
 }