I saw a wrong explanation in an explanation video, but it was explained correctly in the video. The codes are as follows friends.
Код: Выделить всё
public User Put([FromBody] User user)
{ var editedUser=_users.FirstOrDefault(x-> x.Id==user.Id)
editedUser.Firstname=user.Firstname;
editedUser.Lastname=user.Lastname;
return to user;
}
Источник: https://stackoverflow.com/questions/781 ... eb-api-put