public ActionResult DeleteConfirmed(int id) { Monitor monitor = _monitorService.GetById(id); _monitorService.Delete(id); return(RedirectToAction("Index")); }
public ActionResult Delete(int Id) { if (service.Delete(Id)) { BackgroundJob.Enqueue(() => index.DeleteItem(Id)); return(RedirectToAction("Index")); } else { return(View("Error")); } }
public IActionResult Delete(string id) { if (id == null) { return(BadRequest()); } bool monitor = monitorService.Delete(id); if (monitor == false) { return(NotFound()); } return(Ok()); }