Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use DbContextScope with Parallel.ForEach #66

Open
pentest30 opened this issue Feb 26, 2019 · 0 comments
Open

how to use DbContextScope with Parallel.ForEach #66

pentest30 opened this issue Feb 26, 2019 · 0 comments

Comments

@pentest30
Copy link

pentest30 commented Feb 26, 2019

how i can use DbContextScope with Paralle.Foreach
because i was not able to use it correctly . and this exception thrown every time.
"The context cannot be used while the model is being created. This exception may be thrown if the context is used inside the OnModelCreating method or if the same context instance is accessed by multiple threads concurrently. Note that instance members of DbContext and related classes are not guaranteed to be thread safe."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant