.net core 服务生命周期

Singleton : 在整个程序的生命周期内获取到的实例都是一样的

Scoped : 在一次请求范围内获取到的实例都是一样的

Transient : 每一次获取实例都是新的实例

原文地址:https://www.cnblogs.com/leehomlee/p/11611339.html