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
using(varcontext=newBlogContext()){context.Database.Log=Console.Write;varblog=context.Blogs.First(b =>b.Title=="One Unicorn");blog.Posts.First().Title="Green Eggs and Ham";blog.Posts.Add(newPost{Title="I do not like them!"});context.SaveChangesAsync().Wait();}
Why do you provide an example that use .Wait()? I think it's a bad practice and can make developers misunderstand and go the wrong way while using asynchronous programming. In my opinion, you should provide a sample code that follows the best practice in order to make it more helpful to the reader.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 97eca854-650c-5c9e-25f2-e5e92e91c310
Version Independent ID: be1279e0-ce03-8b44-bdf7-d9d173aba9b7
I have a concern about the below code block:
Why do you provide an example that use .Wait()? I think it's a bad practice and can make developers misunderstand and go the wrong way while using asynchronous programming. In my opinion, you should provide a sample code that follows the best practice in order to make it more helpful to the reader.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: