Azure Function Trigger Basic Code Template Style

상준 이 251 Reputation points
2021-09-14T02:28:45.647+00:00

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?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
553 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,321 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2021-09-14T08:51:39.02+00:00

    @상준 이 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.

    0 comments No comments

0 additional answers

Sort by: Most helpful