1

Assuming I am never writing with EF, will never call SaveChanges for example, Is EF safe for concurrent reads from the same ObjectContext?

It may still be initialising a database connection and reading new objects, or updating existing objects (or deleting!) but it won't be writing anything to the db, so no transactions (I assume).

Thanks

1 Answer 1

2

ObjectContext and related EF classes are not thread safe so don't use them for concurrent operations. If you need to run concurrent data access use a new context for every thread.

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect, I sort of assumed they weren't, but I am forever the optimist :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.