Sharing code across Azure functions using class libraries
Let's say that we have developed a common library across various applications being used in our project, such as a web app or a Windows Presentation Foundation (WPF) application, and now we would like to re-use some functionality in an Azure function app. It's definitely possible to re-use it. In this recipe, we'll develop and create a new .dll
file and we'll learn how to use the classes and their methods in Azure functions.
How to do it…
Let's create a class library by performing the following steps:
- Create a new Class Library application using Visual Studio as shown in Figure 10.7:
Figure 10.7: Visual Studio—creating a class library project
- Create a new class named
Helper
and paste the following code in the new class file:namespace Utilities {     public class Helper     {       public static string...