Skip to content

Instantly share code, notes, and snippets.

@LauraKokkarinen
Last active September 29, 2020 10:06
Show Gist options
  • Save LauraKokkarinen/04ad59e87e36d4fb806ae3c30a3c5932 to your computer and use it in GitHub Desktop.
Save LauraKokkarinen/04ad59e87e36d4fb806ae3c30a3c5932 to your computer and use it in GitHub Desktop.
using AzureFunctionsDependencyInjection.Services;
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
// Required if you want to add custom services
[assembly: FunctionsStartup(typeof(AzureFunctionsDependencyInjection.Startup))]
namespace AzureFunctionsDependencyInjection
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
builder.Services.AddSingleton<IDataService, DataService>(); // Add custom data fetching service
builder.Services.AddSingleton<IBlobService, BlobService>(); // Add custom blob caching service
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment