Created
October 24, 2021 16:36
-
-
Save jiimaho/b10c742b913e9130826d975ee31d69f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task FunctionHandler(SQSEvent evnt, ILambdaContext context) | |
{ | |
// Calling CreateScope() here is required to resolve scoped services correctly | |
using var scope = ServiceProvider.CreateScope(); | |
await scope.ServiceProvider.GetService<App>().Run(evnt); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment