Example #1
0
        /// <summary>
        /// Determines whether the <see cref="EntitySet"/> contains a <see cref="WEntity"/> object.
        /// </summary>
        /// <param name="item">The item to find.</param>
        /// <exception cref="ArgumentNullException">If <see cref="item"/> is <c>null</c>.</exception>
        /// <returns><c>true</c> of the item was found; otherwise, <c>false</c>.</returns>
        public bool Contains(WEntity item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            return(Contains(item.Entity));
        }
Example #2
0
        /// <summary>
        /// Removes a <see cref="WEntity"/> object from the <see cref="EntitySet"/>.
        /// </summary>
        /// <param name="item">The item to remove.</param>
        /// <exception cref="ArgumentNullException">If <see cref="item"/> is <c>null</c>.</exception>
        /// <returns><c>true</c> if the item was removed; otherwise, <c>false</c>.</returns>
        public bool Remove(WEntity item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            return(Remove(item.Entity));
        }