I am trying to connect my new Azure Function to an on-premises SQL Server database. The Microsoft docs mention that this is possible, but I have not been able to figure it out nor have I seen any tutorials about specifically setting up a on-premises db with Azure Functions.
I want to do something similar to this tutorial.
public static async void Run(TimerInfo myTimer, TraceWriter log)
{
var str = ConfigurationManager.ConnectionStrings["on-prem-connection"].ConnectionString;
//open connections and call db here - I know this
}
Can I do it in a similar way to the video above where I set up a connection string and then reference that connections string in the Azure Function. If so how is that done.
Thanks you.