public async Task <IActionResult> PutSkill(int id, Skill skill) { if (id != skill.SkillId) { return(BadRequest()); } _context.Entry(skill).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkillExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPosition(int id, Position position) { if (id != position.PositionId) { return(BadRequest()); } _context.Entry(position).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PositionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutHireRequest(int id, HireRequest hireRequest) { if (id != hireRequest.HireRequestId) { return(BadRequest()); } _context.Entry(hireRequest).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HireRequestExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }