56
94.0
Mar 10, 2011
As the static variable has only one instance in the memory, all the request are using the same ObjectContext of the entity framework.
If one request dispose the ObjectContext while another request is in the middle of using it, will that not cause unexpected results?
630
99.9
Mar 10, 2011
Mr London UK:
I would recommend against what you are suggesting. From an OO perspective is seems wrong for two or more methods to coordinate the lifetime of an object instance (the context) until someone decides to dispose of it. The relative performance gains do not compare to the potential risks.
Hope this helps.