If I have a PerWebRequest
object that has a wcf proxy dependency with a PerThread lifestyle, will the container
If a), then should I release the service explicitly to avoid leakage, or if b), is there any real benefit to using PerThread for the proxy if this is the only place it's being injected?
Why would you make it per-thread? Per thread is a very specialised lifestyle and unless you really need it, I would suggest you avoid it.
Make the wcf proxy transient.
You don't have to release it. Here's how it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With