public async Task <ActionResult <SkillsForJob> > PostSkillsForJob(SkillsForJob skillsForJob) { _context.SkillsForJobs.Add(skillsForJob); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetSkillsForJob), new { id = skillsForJob.Id }, skillsForJob)); }
public async Task <IActionResult> PutSkillsForJob(int id, SkillsForJob skillsForJob) { if (id != skillsForJob.Id) { return(BadRequest()); } _context.Entry(skillsForJob).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillsForJobExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }