Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is IDbCommandInterceptor in EntityFramework 6 thread safe

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 Answers

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


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!