public async Task <IActionResult> PutUserId(int id, UserId userId) { if (id != userId.Id) { return(BadRequest()); } _context.Entry(userId).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserIdExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult> PutInteraction(int id, Interaction interaction) { if (id != interaction.InteractionId) { return(BadRequest()); } _context.Entry(interaction).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InteractionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }