5

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.

halfer
  • 19,471
  • 17
  • 87
  • 173
Ravi Anand
  • 4,559
  • 7
  • 40
  • 70
  • Possible duplicate of [Azure Functions - Shared classes](http://stackoverflow.com/questions/39540951/azure-functions-shared-classes) – Mikhail Shilkov May 16 '17 at 17:09

1 Answers1

13

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

Fabio Cavalcante
  • 11,913
  • 3
  • 31
  • 41