This is part 2 in our series on .NET APIs with C# – Functions. Find Part 1 here.
In this part we’ll talk about how you build an Azure Function. Functions are another way of interacting with an API. Here we’ll briefly discuss how you can get started with them.
- Name your function, choose a location and click Next
- Select your runtime and hosting. Generally speaking, choose the latest LTS (Long Term Support) option
- Under authorization, choose Anonymous
- Under Function, select Http trigger
- Check Use Azurite (we’ll need this in a future post about durable functions)
- Click next and hey presto! your solution is created.
You should now have a solution with a Function. Right click on the project and select Add > New Azure Function. Now click Add and you will see a list of triggers. For this discussion, select Http Trigger.