- Transient
- Scoped
- Singleton
Transient
Every request from the service container, it will be recreated.
Not to be confused with every controller request. but if in the pipeline of your request it is provided in multiple constructors and those are called from the service container, it will be instantiated as a new instance
Scoped
The object is instantiated once per client request / per connection
Singleton
The object is instantiated only once for all client calls.
Geen opmerkingen:
Een reactie posten