Could you somebody explain to me a strange behavior of async EFCore methods? I have ASP.NET WebApi application using EFCore DB context. When I try execute basically something like that:
await db.AnyAsync(entity.Compare());
await db.AddAsync(entity);
await db.SaveAsync();
I getting exception
A second operation started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.
I have some idea where is the problem, but I have to be sure.