Skip to content

how to use DbContextScope with Parallel.ForEach #66

@pentest30

Description

@pentest30

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."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions