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