Azure Functions + Table Storage - CRUD

Imagine having all your CRUD operations in a single Azure Function? In this post, I'm going to use Azure Table Storage to demonstrate all CRUD operation in a single function. Keep in mind this is for demonstration purposes only, for scalability sake you would probably have separate functions for reads and writes.

To be able to access my Azure Table Storage, I'll have to set two bindings for my function. You can achieve the same in the portal by going to the integrate tab and adding Azure Table Storage as both Input and Output. You will also need to configure your connection string.

I've got my two extra bindings as my inputTable and outputTable parameters, I also created a shared crud method so I can reuse across multiple functions and a model for each function together with its projection.

My model is a simple class inheriting from TableEntity, I'm not going to paste it all here, and my projection is a Func getting a dynamic and returing a Customer.