public async Task <IActionResult> PutUserAccounts(int id, UserAccounts userAccounts) { if (id != userAccounts.UserId) { return(BadRequest()); } _context.Entry(userAccounts).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserAccountsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutIncidentData(string id, IncidentData incidentData) { if (id != incidentData.IncidentId) { return(BadRequest()); } _context.Entry(incidentData).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!IncidentDataExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutHomeAccount(int id, HomeAccount homeAccount) { if (id != homeAccount.AccountId) { return(BadRequest()); } _context.Entry(homeAccount).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HomeAccountExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEmployee(int id, Employee employee) { 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()); }