title: Multi Environment Azure Function
body: <p>I want to create an Azure function which is a queue trigger, that when it fires it connects to a SQL DB and gets a record and updates it.</p>
  
  <p>How do I handle making sure the SQL connection queries the right database? Eg Staging DB vs Production DB</p>
  
  <p>Do I need to have two instances of the same azure function? One that has it's connection string set in application settings to point to staging db and the other set to point at production db? Surely not?!</p>
  
  <p>Every article I can find talks about your local.settings.json and production..which is fine. But in the real world we might have local, testing, staging, production.</p>
  
  <p>I can pass through the environment as part of the queued message that comes into my Azure function, but surely there is a more elegant way and I'm missing something?</p>