如何覆盖azurewebjobsstorage的ConnectionsTring值为.NET Core函数应用程序中的新值
我必须根据某种条件指定存储帐户连接属性,
例如:
if(condition=true)
[StorageAccount("ConnectionString1")]
else
[StorageAccount("ConnectionString2")]
我们是否有一些条件属性可以在.NET中实现此目标?
I have to specify the storage account connections attribute based on some condition
eg:
if(condition=true)
[StorageAccount("ConnectionString1")]
else
[StorageAccount("ConnectionString2")]
Do we have some conditional attributes to achieve this in .net?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我为覆盖Azure函数应用程序存储帐户所做的解决方法之一是:
local.settings.json
文件如下:结果:
如果参数名称值有所操作/活动:
One of the workarounds I did to override the Azure Function App Storage Accounts is:
local.settings.json
file like below:Result:
If the parameter name value is different, then utilize the 2nd Storage account to store logs, perform any other operations/activities: