public HttpResponseMessage Delete(int id) { _jobPostingService.Delete(id); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public ActionResult Delete(int id) { var jobPosting = _jobPostingService.GetAll().FirstOrDefault(x => x.PostID == id); if (jobPosting != null) { _jobPostingService.Delete(jobPosting); } return(RedirectToAction("Index")); }