#AddSingleton

AddTransient,AddScope和AddSingleton 有什么不同?

我们先来创建几个接口usingSystem;namespaceDependencyInjectionSample.Interfaces{publicinterfaceIOperation{GuidOperationId{get;}}publicinterfaceIOperationTransient:IOperatio...