示例#1
0
        public ActionResult DeleteJobOffer(int id)
        {
            var jobOfferModelFromRepo = _jobOfferRepository.GetJobOfferById(id);

            if (jobOfferModelFromRepo == null)
            {
                return(NotFound());
            }

            _jobOfferRepository.DeleteJobOffer(jobOfferModelFromRepo);
            _jobOfferRepository.SaveChanges();

            return(NoContent());
        }