public async Task <IActionResult> PutPicture(int id, Picture picture) { if (id != picture.PictureId) { return(BadRequest()); } _IPicture.Update(picture); try { await _IPicture.SaveAsync(); } catch (DbUpdateConcurrencyException) { if (!PictureExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }