https://github.com/ebyte23/aws-lambda-dotnet-quickstart-templates
Quick start templates for aws lambda in c# .net core
https://github.com/ebyte23/aws-lambda-dotnet-quickstart-templates
Last synced: about 1 year ago
JSON representation
Quick start templates for aws lambda in c# .net core
- Host: GitHub
- URL: https://github.com/ebyte23/aws-lambda-dotnet-quickstart-templates
- Owner: eByte23
- License: mit
- Created: 2019-03-29T02:07:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T02:24:00.000Z (about 7 years ago)
- Last Synced: 2025-02-13T13:42:49.088Z (over 1 year ago)
- Language: C#
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-lambda-dotnet-quickstart-templates
Quick start templates for aws lambda in c# .net core
### Quick start
This aim at using dependecy inject in aws lambda func base on aws events.
Simply implement the abstract FunctionBase
And if you want to use DI over ride ConfigureServices
Create your app that inherits IApp and add your depencies in the constructor and away you go.
Example Bellow
```c#
public class App : IApp
{
// Inject your services into the constructor of app!
private readonly ISomethingService _somthingService;
public App(ISomethingService somthingService)
{
_somthingService = somthingService;
}
public async Task RunAsync(SQSEvent sqsEvent, ILambdaContext context)
{
// actual business logic goes here
var someThing = await _somthingService.GetThingAsync();
await Task.CompletedTask;
}
}
```