Reputation: 131
If you need to create 5 related serverless azure functions that have similar dependencies and a large portion of the code would be the same, do you have to create and maintain 5 separate Visual Studio solutions/projects? Is it possible to create one solution/project in Visual Studio but then spawn 5 instances (passing in a different parameter to each one)?
For example, 1 is timer based and runs Function1 another is queue based and runs Function2 etc.
Upvotes: 0
Views: 30
Reputation: 18387
Yes, you can have one function App with multiple types of triggers and share the logic between them.
There's even support for Dependency Injection:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection
Upvotes: 1