I have azure service bus (I use Azure.Messaging.ServiceBus
) with configured MaxConcurrentCalls
in receiver (let’s say to 10). I want to make thread safe access to EF
dbcontext in the callback and I don’t want creating a new dbcontext
in each new call. I also, don’t want to lock the whole callback operation (in this case the whole benefits from MaxConcurrentCalls are disappear). I don’t see more options yet.
Any ideas would be appreciated.