From the course: Azure Functions for Developers

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Implementing the PdfCreator function

Implementing the PdfCreator function - Azure Tutorial

From the course: Azure Functions for Developers

Implementing the PdfCreator function

- [Instructor] Up to now when a website is registered, we're storing the data in a SQL Server database, right? Now, let's create a PDF file as a way to create a snapshot that is rate friendly. I'm going to show you how easy it is to create PDF files using Puppeteer Sharp. The PDF file should be created when a new website registration is inserted in the website's table, so that's why we're going to use the SQL trigger again. To expedite this process, I've already created this PdfCreator class and added this run method as a function with the name PdfCreator. And as you can see, this is pretty similar to the code that we have in the snapshot function, but the only difference is that I'm using a SQL change array instead of the I read only list collection. I did this just to show you that it's possible, okay? And finally, you can see that I'm injecting an ilogger of PdfCreator using the primary construction syntax. So I'm ready to implement the following method. Let's type private async…

Contents