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); }
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); }