public async Task <IActionResult> PutCandidate(int id, Candidate candidate) { if (id != candidate.CandidateId) { return(BadRequest()); } _context.Entry(candidate).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CandidateExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutJobOffer(int id, JobOffer jobOffer) { if (id != jobOffer.JobOfferId) { return(BadRequest()); } _context.Entry(jobOffer).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobOfferExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }