May be it's a wrong question, but I need to create a Model/class and access same in azure function. I could not able to find how can I create a class.
Java function basicsA single package is deployed to a function app in Azure. When running in Azure, the function app provides the deployment, execution, and management context for your individual Java functions.
The ILogger becomes available within your code, and you can access the Log methods (LogInformation, and so on). In case you want to use the ILogger in various other classes in your function you can do Dependency Injection using Azure Function Autofac.
Classes may be created inline as it would typically define a class in a regular C# project. Here's an example of a function that defines a class.
You can also define classes in separate files and reference those files using the #load
directive as documented here.
Another option is to reference an assembly where your classes are defined, as documented here.
And, a different approach, and yet another option, is to use the newly announced Visual Studio 2017 Tools for Azure Functions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With