“数据连接"天蓝色 [英] "Data connections" in azure

查看:93
本文介绍了“数据连接"天蓝色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对天蓝色的数据连接"有疑问.

I have a question about "Data connections" in azure.

我有一个应用程序服务.我在那里发布了我的API应用.在我的应用程序中,我有连接字符串(我需要使用数据库).在我的应用程序的众多设置中,我看到了数据连接"项:

I have an App Service. I published my API app there. In my app I have connection strings (I need to work with databases). Among numerous settings for my app I saw a "Data connections" item:

您可以在其中添加新连接(服务器,登录名和密码).创建后,您可以查看此连接的连接字符串:

There you can add new connection (server, login, password). After creation you can look at connection string for this connection:

我的问题是: 1.它是做什么的? (我的意思是在我的应用程序中,Web.config中已经有一个连接字符串,并且在天蓝色的环境中使用连接字符串有什么好处吗?) 2.如何在我的应用程序中使用此来自天蓝色的连接"?

My questions are: 1. what does it do? (I mean in my app I already have a connection string in Web.config and is there any advantages of using connection string in azure?) 2. how to use this "connection from azure" in my app?

我将不胜感激.

推荐答案

添加数据连接后,您会发现它已配置为

After you add a Data Connection, you can find that it is configured to Connection strings section under Application settings blade. And for .NET apps, these connection strings are injected into your .NET configuration connectionStrings settings at runtime, overriding existing entries where the key equals the linked database name.

此外,当我们

Besides, you can find Data Connection section is under Mobile tab, when we do with Azure Mobile Apps’ Easy Tables, we need Data Connection to connect to a database.

这篇关于“数据连接"天蓝色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆