-
Notifications
You must be signed in to change notification settings - Fork 0
Add Services
Mika Berglund edited this page Aug 1, 2019
·
2 revisions
The Startup class is where you add your configuration data as services. This is also where you register any other functionality that you want to enable for your function classses.
There are three different kinds of services you add - Transient, Scoped and Singleton. Each of these have different lifetimes.
You can basically add any class instance as service for use in your application. In our sample Startup
class we add our configuration class instances as singleton services. The services are added as singleton, because all function invokations in our function application use the same configuration information.
To learn more, have a look at the full source code for the Startup
class.