public async Task <IActionResult> PutJob(int id, Job job) { if (id != job.Id) { return(BadRequest()); } _context.Entry(job).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JobExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEmployeeSkill(int id, EmployeeSkill employeeSkill) { if (id != employeeSkill.Id) { return(BadRequest()); } _context.Entry(employeeSkill).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmployeeSkillExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }