public async Task <IActionResult> PutAppUser(string id, AppUser appUser) { if (id != appUser.Id) { return(BadRequest()); } _context.Entry(appUser).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AppUserExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutLike(Guid id, Like like) { if (id != like.LikeId) { return(BadRequest()); } _context.Entry(like).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LikeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutInterest(int id, Interest interest) { if (id != interest.InterestId) { return(BadRequest()); } _context.Entry(interest).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InterestExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }