This sample contains an Azure SQL Bindings Trigger for Azure Functions. You can create a code space on this repository to fully test and use this trigger function all with a local SQL database.
- Start by creating a codespace on this repository (feel free to fork).
- Once the code space is up, create a database using the steps outlined in the next section.
- With the ADO.NET connect string, replace the CONNECT_STRING placeholder in the local.settings.json file
- Press F5 to run the local function
- Insert a row into the database table with the T-SQL statements in the db_objects.sql file
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/prod.list)"
sudo apt-get update
sudo apt-get install sqlcmd
then, run the following commands:
to create the database:
sqlcmd create mssql -u devDB --accept-eula
to see the connect string
sqlcmd config connection-strings
Once you have the ADO.NET connect string, replace the CONNECT_STRING placeholder in the local.settings.json file