✅ A second operation was started on this context instance before a previous operation completed.
i have two layoust one for mobile and second for pc and when i use mobile layout it throws me this error
3 Replies
how does
GetLeaderBoardPositionAsync
look likean instance of a EF Core dbcontext cannot be used concurrently, the error is pretty much telling you what's wrong
if you're using EF directly in blazor components you should consider injecting
IDbContextFactory<YourDbContext>
instead of the dbcontext itself because blazor component lifetimes don't match the lifetime you should have for dbcontextsthanks