public async Task <ActionResult <Friend> > Put(Guid id, [FromBody] Friend friend) { var friendUpdate = await _friendService.GetAsync(id); if (friendUpdate is null) { return(NotFound("Amigo não encontrado")); } friendUpdate.Name = friend.Name; await _friendService.UpdateAsync(friendUpdate); return(CreatedAtRoute("Get", new { id = friendUpdate.Id }, friendUpdate)); }