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

            _repository.Remove(_repository.GetByPrimaryKey(keys));
            _repository.SaveChanges();
        }