Beispiel #1
0
 public void Delete(int id)
 {
     try
     {
         repository.Delete(id);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Beispiel #2
0
 public void Delete(int id)
 {
     try
     {
         var myObject = _repository.GetById(id);
         _repository.Delete(myObject);
         _unitOfWork.Commit();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }