public async Task <IHttpActionResult> Delete(Guid id) { var result = await _certificateService.Delete(id); if (!result) { return(BadRequest()); } return(Ok()); }
public IActionResult DeleteCertificate(int id) { try { _service.Delete(id); return(Ok("Record Deleted Successfully..")); } catch (AppException ex) { return(BadRequest(new { message = ex.Message })); } }
public ActionResult Delete(string courseId, Certificate certificate) { try { _certificateRepository.Delete(certificate.Id); return(RedirectToAction("Details", "Course", new { Id = courseId })); } catch { return(View(certificate)); } }
public ActionResult DeleteConfirmed(Guid id) { certificateService.Delete(id); return(RedirectToAction("Index")); }