Developer Developer - 1 year ago 114
C# Question

IoC lifetime difference

I am a newbie in C #, and just started to learn IoC in web api.
What is the difference in


Sorry for bad English.

Answer Source
  • Singleton

It's mean "one instance for all". All times when you call Resolve (even implicitly) you got the same object

  • Transient

It's opposite to singletone. You'll get as many object as you call Resolve

  • PerWebRequest

Read how Singleton for one request and transient for other (You'll get as many object as request receive)

for more information read the catle.windsor manual or official docs

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download