Exemplo n.º 1
0
    public HttpResponseMessage Delete(int id)
    {
        _jobPostingService.Delete(id);

        SuccessResponse response = new SuccessResponse();

        return(Request.CreateResponse(HttpStatusCode.OK, response));
    }
Exemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            var jobPosting = _jobPostingService.GetAll().FirstOrDefault(x => x.PostID == id);

            if (jobPosting != null)
            {
                _jobPostingService.Delete(jobPosting);
            }

            return(RedirectToAction("Index"));
        }