It’s not thread safe. Simply create a new instance of DbContext
in you thread.
More Related Contents:
- Unique key with EF code first
- Ignoring a class property in Entity Framework 4.1 Code First
- Entity Framework Join 3 Tables
- What’s the best way of implementing a thread-safe Dictionary?
- Concurrent HashSet in .NET Framework?
- Why is .Contains slow? Most efficient way to get multiple entities by primary key?
- How to retrieve Data Annotations from code? (programmatically)
- EF Code First: How to get random rows
- C# thread safety with get/set
- EF Code First – how to set identity seed?
- Can a DbContext enforce a filter policy?
- Entity Framework 4.1 InverseProperty Attribute
- How to make ObservableCollection thread-safe?
- Better way to query a page of data and get total count in entity framework 4.1?
- Can you get the DbContext from a DbSet?
- Difference between Interlocked.Exchange and Volatile.Write?
- Unit test for thread safe-ness?
- How to correctly read an Interlocked.Increment’ed int field?
- Is it safe to use a boolean flag to stop a thread from running in C#
- ConcurrentDictionary Pitfall – Are delegates factories from GetOrAdd and AddOrUpdate synchronized?
- Thread safety on readonly static field initialisation
- What is the difference between IDbSet.Add and DbEntityEntry.State = EntityState.Added?
- Is Stopwatch.ElapsedTicks threadsafe?
- DbSet table name
- C# Thread safe fast(est) counter
- Is it possible to observe a partially-constructed object from another thread?
- Is int? thread safe?
- Create association on non-primary key fields with Entity Framework 4.1 Fluent API
- Are C# structs thread safe?
- SqlConnection Thread-Safe?