首页 文章

Azure功能无法使用没有实体提供程序的连接字符串

提问于
浏览
2

我有一个使用DAL dll的Azure Function系统 . 这个dll使用实体框架连接到SQL数据库,并且是我们数据库第一个代码的UnitOfWork格式 .

在azure函数中,没有标准的“app.config”文件用我的连接字符串更新到我的数据库 . 所以我在应用程序设置的GUI中添加了它:

enter image description here

我已经从app.config中复制了代码,只需从配置中获取值,转换“值,然后将其粘贴到GUI中 .

<add name="Entities" connectionString="<This is what I copied>" providerName="System.Data.EntityClient" />

但是,每当我运行代码时,我都会收到此错误:

2016-10-14T12:39:44.248 C# ServiceBus queue trigger function processed message: test
2016-10-14T12:39:44.265 Getting UnitOfWork
2016-10-14T12:39:44.607 Getting Repository
2016-10-14T12:39:44.639 ERROR The connection string 'Entities' in the application's configuration file does not contain the required providerName attribute."

因此,通常提供者名称将是实体框架,但我不知道如何在代码中包含它 . 我的问题是,如何连接此连接字符串,并拥有实体框架提供程序?

1 回答

相关问题