public ActionResult DeleteWork(long id) { Work work = WorkRepository.GetWork(id); if (work != null) { WorkRepository.DeleteWork(work); return(Ok()); } return(NotFound()); }