You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Update method (string id, Book bookIn) contains an error - we in bookIn do not fill in the Id property, and therefore ReplaceOne will throw an exception. It should be something like this:
public async void Update(string id, Book bookIn)
{
bookIn.Id = id;//фикс ошибки.
await Books.ReplaceOneAsync(b => b.Id == id, bookIn);
}
Сведения о документе
⚠ Не вносите правки в этот раздел. Это необходимо для связывания страницы сайта docs.microsoft.com с вопросом на GitHub.
ID: 5240866d-d0a1-f0dd-7b2c-203e1d69bc4b
Version Independent ID: 83a5cb3b-23bc-4f0c-cd1c-1d1ffeb1131a
The comments below were machine-translated
@Maximys commented on Thu Apr 09 2020
The Update method (string id, Book bookIn) contains an error - we in bookIn do not fill in the Id property, and therefore ReplaceOne will throw an exception. It should be something like this:
public async void Update(string id, Book bookIn)
{
bookIn.Id = id;//фикс ошибки.
await Books.ReplaceOneAsync(b => b.Id == id, bookIn);
}
Сведения о документе
⚠ Не вносите правки в этот раздел. Это необходимо для связывания страницы сайта docs.microsoft.com с вопросом на GitHub.
@srvbpigh commented on Thu Apr 09 2020
Hello, @Maximys
Thank you for your feedback.
We are actively reviewing your comments and will get back to you soon.
Kind regards,
Microsoft DOCS International Team
The text was updated successfully, but these errors were encountered: