In Azure Function Isolate Process, what is the reason that Functions are created as Static Class and Static Method by default? Even if it is not static, it works normally.
Is there any reason it must be static?
In Azure Function Isolate Process, what is the reason that Functions are created as Static Class and Static Method by default? Even if it is not static, it works normally.
Is there any reason it must be static?
@18253371 Like you've mentioned, both work and its completely up to you. Originally, only static functions were supported and later support for instance functions were added.
Dependency Injection requires non-static classes but for most simpler use cases, you could get away with static classes. For example, simple transformations, routing scenarios, etc.
9 people are following this question.