Esempio n. 1
0
 public ActionResult Delete(int id)
 {
     try
     {
         _sampleService.DeleteSample(id);
     }
     catch (RetryLimitExceededException /* dex */)
     {
         //Log the error (uncomment dex variable name and add a line here to write a log.
         return(RedirectToAction("Delete", new { id = id, saveChangesError = true }));
     }
     return(RedirectToAction("Index"));
 }
Esempio n. 2
0
 public IActionResult Delete([FromRoute] Guid id)
 {
     _service.DeleteSample(id);
     _unitOfWork.Save();
     return(NoContent());
 }