Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dependency Injections on Azure Functions V2
public static class CoreGitHubRepositoriesHttpTrigger
{
public static IFunctionFactory Factory = new CoreFunctionFactory(new CoreAppModule());
[FunctionName("CoreGitHubRepositoriesHttpTrigger")]
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = "core/repositories")]HttpRequest req, ILogger log)
{
var result = await Factory.Create<IGitHubRepositoriesFunction>(log)
.InvokeAsync<HttpRequest, object>(req)
.ConfigureAwait(false);
return new OkObjectResult(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.