-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStartup.cs
More file actions
25 lines (21 loc) · 860 Bytes
/
Startup.cs
File metadata and controls
25 lines (21 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using AzureDevOpsStateTracker.Functions;
using AzureDevopsTracker.Configurations;
using AzureDevopsTracker.Data;
using AzureDevopsTracker.Services;
using AzureDevOpsTracker.Functions;
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
[assembly: FunctionsStartup(typeof(Startup))]
namespace AzureDevOpsTracker.Functions
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
var configuration = builder.GetContext().Configuration;
builder.Services.AddScoped<ServiceToInject>();
builder.Services.AddScoped<AzureDevopsTrackerService>();
builder.Services.AddAzureDevopsTracker(new DataBaseConfig(configuration["ConnectionStrings:DefaultConnection"]));
}
}
}