public async Task <IActionResult> PutRecordDetails(int id, RecordDetails recordDetails) { if (id != recordDetails.Rdid) { return(BadRequest()); } _context.Entry(recordDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RecordDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutUserAccount(int id, UserAccount userAccount) { if (id != userAccount.UserId) { return(BadRequest()); } _context.Entry(userAccount).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserAccountExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }