public IActionResult Delete(int id) //delete checklist { try { _context.Delete(id); //Call to delete method with defined id return(NoContent()); // returns a response code of 200 } catch { return(BadRequest()); //Returns 400 when Exception } }
public JsonResult Delete(int id) { var data = _CheckListService.Delete(id); return(Json(data)); }