コード例 #1
0
        public bool Remove(TEntity entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity), "Item cannot be null!");
            }
            bool removedSuccessfully = Entities.Remove(entity);

            if (removedSuccessfully)
            {
                ChangeTracker.Remove(entity);
            }
            return(removedSuccessfully);
        }
コード例 #2
0
        public bool Remove(TEntity item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item), "item cannot be null!");
            }
            var removedSuccessfully = Entities.Remove(item);

            if (removedSuccessfully)
            {
                ChangeTracker.Remove(item);
            }
            return(removedSuccessfully);
        }