R
R
rundll322020-06-27 19:05:42
C++ / C#
rundll32, 2020-06-27 19:05:42

Does the second operation start before the first?

There is a base on EntityFramework and a TelegramBot package. I'm trying to make a simple Select by ChatId:

var chatId = message.Chat.Id;
var cour = Db.Couriers.Where(x => x.ChatId == chatId).FirstOrDefault();

And it is at this moment that I catch the exception. Googling didn't lead to a solution.
All exception: System.NotSupportedException: "A second operation started on this context before a previous asynchronous operation completed. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context. Any instance members are not guaranteed to be thread-safe."
It should also be noted that the method itself is marked async and taken from the TelegramBot github.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-06-27
@Makaroshka007

https://stackoverflow.com/questions/20628792/multi...
https://forums.asp.net/t/2143284.aspx?A+second+ope...
https://www.youtube.com/ watch?v=yoLLIR1QHnc Have you
watched this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question