每个请求是一个Scope
为什么不能直接从Root Scope中Resolve实例,会造成内存泄漏,原因是Root Scope不会Dispose,长命持有短命问题
注意CreateScope() Scope的范围
Ref
https://andrewlock.net/the-dangers-and-gotchas-of-using-scoped-services-when-configuring-options-in-asp-net-core/
https://blog.ploeh.dk/2014/06/02/captive-dependency/