Skip to content

Startup Class

Mika Berglund edited this page Jul 31, 2019 · 3 revisions

The Startup Class

You use a Startup class to wire up your services, just as you do in ASP.NET Core applications too. The code below shows the setup for the class.

using FunctionApplication;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Hosting;

[assembly: WebJobsStartup(typeof(Startup))]

namespace FunctionApplication
{
    public class Startup : IWebJobsStartup
    {
        public void Configure(IWebJobsBuilder builder)
        {
        }
    }
}

The Configure method is where you add your configuration data as services. This is also where you can add any other functionality as services that you then can inject into your function classes.

The complete Startup class is available in the repo.