public ActionResult DeleteRequest(int id) { var request = ReBO.GetRequestByID(id); ReBO.Delete(request); return(RedirectToAction("StudentImage", "Student", new { StudentID = request.StudentID })); }
public bool Delete(Request request) { try { using (var u = new RequestBusiness()) { return(u.Delete(request)); } } catch (Exception ex) { Console.WriteLine(ex); return(false); } }
public IHttpActionResult Delete([FromBody] Request request) { try { using (var c = new RequestBusiness()) { if (c.Delete(request)) { return(Ok()); } return(NotFound()); } } catch (Exception ex) { return(BadRequest($"{ex}")); } }