Transient life cycle

The services define the transient life cycle using the .AddTransient() method. Every time the consumer requires the initialization of a transient service, the dependency injection container returns a new instance. The transient life cycle is the safest life cycle, because it returns a new instance each time, and instances are not shared between consumers. It is also, however, the least efficient, because it can create a huge number of instances, especially in the web environment. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.124.244