From the course: Azure Functions for Developers
Unlock the full course today
Join today to access over 25,100 courses taught by industry experts.
Implementing the SqlOutput trigger in the Register function - Azure Tutorial
From the course: Azure Functions for Developers
Implementing the SqlOutput trigger in the Register function
- [Instructor] The register function is only returning the website object that is being deserialized. Nothing fancy or tricky here. Let's modify the function to store the website registration as a record in a SQL Server database. To do this, we're going to use a SQL output binding. So we need to add a new nugget package reference, which is Microsoft Azure, functions, worker, extensions, SQL, this is the package. So let's click on install and accept the dialogue. And let's close this and let's return to the code. The SQL output binding is an attribute that you can use to decorate the existing method. So SQL output is the name and it has two parameters. The first one is the table name that you want to use for inserting or updating the records. In this case, I'm going to use DBO, which is the schema, and then websites. So we need to create this table in the database and also we need to specify the name of the connection string configuration. So in this case, I'm going to use website…
Contents
-
-
-
-
-
(Locked)
Creating the project2m 21s
-
(Locked)
Initial implementation of the Register function5m 56s
-
(Locked)
Implementing the SqlOutput trigger in the Register function5m 11s
-
(Locked)
Initial implementation of the Snapshot function5m 6s
-
(Locked)
Extracting the text content with HtmlAgilityPack4m 10s
-
(Locked)
Implementing the SqlOutput binding in the Snapshot function3m 58s
-
(Locked)
Implementing the PdfCreator function4m 27s
-
(Locked)
Implementing the BlobOutput and BlobClient in the PdfCreator function7m 52s
-
(Locked)
Initial implementation of the Watcher function2m 35s
-
(Locked)
Modifying the database tables2m 8s
-
(Locked)
Retrieve the data with SQlInput7m 5s
-
(Locked)
Store the snapshot with SqlOutput1m 56s
-
(Locked)
Query2m 26s
-
(Locked)
-
-
-
-