public async Task <IActionResult> PutFeedback([FromRoute] int id, [FromBody] Feedback feedback) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != feedback.FeedbackID) { return(BadRequest()); } _context.Entry(feedback).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FeedbackExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGENumbering([FromRoute] int id, [FromBody] GENumbering gENumbering) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != gENumbering.GENumberingID) { return(BadRequest()); } _context.Entry(gENumbering).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GENumberingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutAddress([FromRoute] int id, [FromBody] Address address) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != address.AddressID) { return(BadRequest()); } _context.Entry(address).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AddressExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEmployee([FromRoute] int id, [FromBody] Employee employee) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != employee.EmployeeID) { return(BadRequest()); } _context.Entry(employee).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmployeeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }