public async Task <IActionResult> PutContact(int id, Contact contact) { if (id != contact.Id) { return(BadRequest()); } _context.Entry(contact).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ContactExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDigitalization(int id, Digitalization digitalization) { if (id != digitalization.Id) { return(BadRequest()); } _context.Entry(digitalization).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DigitalizationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMsgRecord(int id, MsgRecord msgRecord) { if (id != msgRecord.Id) { return(BadRequest()); } _context.Entry(msgRecord).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MsgRecordExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEmployee(int id, Employee employee) { if (id != employee.Id) { return(BadRequest()); } _context.Entry(employee).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmployeeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }