Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Serverless computing in Azure with .NET

You're reading from  Serverless computing in Azure with .NET

Product type Book
Published in Aug 2017
Publisher Packt
ISBN-13 9781787288393
Pages 468 pages
Edition 1st Edition
Languages

Table of Contents (23) Chapters

Title Page
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Understanding Serverless Architecture 2. Getting Started with the Azure Environment 3. Setting Up the Development Environment 4. Configuring Endpoints, Triggers, Bindings, and Scheduling 5. Integrations and Dependencies 6. Integrating Azure Functions with Cognitive Services API 7. Debugging Your Azure Functions 8. Testing Your Azure Functions 9. Configuring Continuous Delivery 10. Securing Your Application 11. Monitoring Your Application 12. Designing for High Availability, Disaster Recovery, and Scale 13. Designing Cost-Effective Services 14. C# Script-Based Functions 15. Azure Compute On-Demand Options

Storing the function results


We previously implemented the result storing procedure in each function separately. In most applications, different functions will serve unrelated purposes and may call different external APIs or store the results in different data stores. In some cases, however, the functions are accessing the same data store in a similar fashion. In such cases, there may be value in implementing this procedure in a shared method to prevent code repetition. Of course, how much code can be reused and how much value the shared method may provide depends on the use case.

Let's demonstrate such a "shared" procedure for storing the data in our SQL Azure database. Keep in mind that the output binding for the table still needs to be defined in each function, but using JObject as the object type allows us to generalize a significant part of the code. We will define a common StoreOutput class to handle the data store.

Since we are treating SQL databases as an external API, this shared...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}