public ActionResult CreateJobOffer(CreateJobOfferDTO createJobOffer) { var jobOfferMapped = _mapper.Map <JobOffer>(createJobOffer); _jobOfferService.CreateJobOffer(jobOfferMapped); return(Ok()); }
public ActionResult UpdateJobOffers(int idJobOfferToUpdate, CreateJobOfferDTO jobOfferValuesUpdated) { try { var jobOfferMapped = _mapper.Map <JobOffer>(jobOfferValuesUpdated); _jobOfferService.UpdateJobOfferById(idJobOfferToUpdate, jobOfferMapped); return(Ok()); } catch (KeyNotFoundException) { return(NotFound()); } }