コード例 #1
0
 public SuccessResponse Delete(DeleteSaucerRequest request)
 {
     try
     {
         var saucer = _saucerRepository.FindBy(request.Id);
         saucer.ThrowExceptionIfRecordIsNull();
         var isReference = _saucerRepository.IsReference(request.Id);
         isReference.ThrowExceptionIfIsReference();
         _saucerRepository.Remove(saucer);
         return(new SuccessResponse {
             IsSuccess = true
         });
     }
     catch (DataAccessException)
     {
         throw new ApplicationException();
     }
 }
コード例 #2
0
 public SuccessResponse Delete(DeleteSaucerRequest request)
 {
     return(_saucerService.Delete(request));
 }