Is IDbCommandInterceptor in EntityFramework 6 thread safe

asp.net-web-api c# entity-framework-6

Question

Is a IDbCommandInterceptor instance considered thread-safe when registered with the DbInterception add method? I have implemented a class that conforms to the IDbCommandInterceptor interface and am tracking the start time of a command when one of the executing methods are invoked compared to the stop time when the corresponding executed method is called. I'm storing this information in a private ivar list and need to know if what I'm doing is safe.

1
3
12/24/2013 8:07:42 PM

Popular Answer

As it turns out the IDbCommandInterceptor is not thread safe as it is only instantiated once.

3
12/6/2013 11:56:06 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow