public async Task <IActionResult> PutAddress(int id, Address address) { if (id != address.AddressId) { return(BadRequest()); } _context.Entry(address).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AddressExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPictureData(int id, PictureData pictureData) { if (id != pictureData.PictureId) { return(BadRequest()); } _context.Entry(pictureData).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PictureDataExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFriendsDetails(int id, FriendsDetails friendsDetails) { if (id != friendsDetails.DetailsId) { return(BadRequest()); } _context.Entry(friendsDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FriendsDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }