public async Task <IActionResult> PutEPIModel(long id, EPIModel ePIModel) { if (id != ePIModel.IdEPI) { return(BadRequest()); } _context.Entry(ePIModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EPIModelExists(id)) { return(NotFound()); } else { throw; } } return(Ok(new { message = "OK" })); }
public async Task <IActionResult> PutMovEPIModel(int id, MovEPIModel movEPIModel) { if (id != movEPIModel.IdMovimento) { return(BadRequest()); } _context.Entry(movEPIModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MovEPIModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }