public async Task <IActionResult> PutTimeRegistration(int id, TimeRegistration timeRegistration) { if (id != timeRegistration.Id) { return(BadRequest()); } _context.Entry(timeRegistration).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TimeRegistrationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutClient(int id, Client client) { if (id != client.Id) { return(BadRequest()); } _context.Entry(client).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }