public async Task <IActionResult> UpdateFriend(long id, Friend friend) { if (id != friend.FriendID) { return(BadRequest()); } _context.Entry(friend).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }