c# working with Entity Framework in a multi threaded server

Some quick advices for Entity Framework in a multi-threaded environment: Don’t use a unique context with locks (no singleton pattern) Provide stateless services (you need to instantiate and dispose one context per request) Shorten the context lifetime as much as possible Do implement a concurrency-control system. Optimistic concurrency can be easily implemented with Entity Framework … Read more