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")); }
public IActionResult Delete([FromRoute] Guid id) { _service.DeleteSample(id); _unitOfWork.Save(); return(NoContent()); }