ews-managed-api
ews-managed-api copied to clipboard
[Docs] Best practices for instantiating ExchangeService? (DI Lifetime)
Hello,
For the ExchangeService class, are you supposed to create a new instance whenever you need it, or should you try to reuse the same instance whenever possible?
For example, if you are registering it in Microsoft DI, should be singleton/scoped, or should it be transient?
I'm using it as Singleton because I'm making a single call on AutoDiscovery (which takes a lot of time to process).