public void Delete(int id) { if (_validatorBehaviour.IsEntityExist(id)) { _repository.Delete(SelectAll().FirstOrDefault(entity => entity.Id == id)); } }
public virtual void Remove(params object[] keys) { if (!_validatorBehaviour.IsEntityExist(keys)) { return; } _repository.Remove(_repository.GetByPrimaryKey(keys)); _repository.SaveChanges(); }