public async Task <IActionResult> PutEmployees(int id, Employees employees) { if (id != employees.EmployeeId) { return(BadRequest()); } _context.Entry(employees).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmployeesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPositions(int id, Positions positions) { if (id != positions.PositionId) { return(BadRequest()); } _context.Entry(positions).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PositionsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }