public async Task <IActionResult> PutEmptb(int id, Emptb emptb) { if (id != emptb.Id) { return(BadRequest()); } _context.Entry(emptb).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmptbExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutStudy([FromRoute] int id, [FromBody] Study study) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != study.ID) { return(BadRequest()); } _context.Entry(study).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StudyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }