Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] C# - Execute code on application startup #2632

Closed
felpel opened this issue Apr 5, 2018 · 1 comment
Closed

[Question] C# - Execute code on application startup #2632

felpel opened this issue Apr 5, 2018 · 1 comment

Comments

@felpel
Copy link

felpel commented Apr 5, 2018

We're trying to find an equivalent mechanism to execute code when the function app is started. We already have our own IExtensionConfigProvider in which we setup the services to be injected inside our functions with our custom InjectAttribute, but I don't think it is the right place to execute anything else (example: create Azure Table Storages if they don't exist for custom entity repositories).

With Azure WebJobs, we could have a Program class with Main method in which we could setup multiple things for our job as shown here. Is there something similar for the Azure Functions runtime?

@paulbatum
Copy link
Member

Short answer - functions does not have an equivalent of Program.Main
See:
#281
#586

(i suspect one should be closed as a dupe of the other)

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants