Windows Azure的,实体框架。关键字不支持:“元数据”。 [英] Windows Azure, Entity Framework. Keyword not supported: 'metadata'.

查看:219
本文介绍了Windows Azure的,实体框架。关键字不支持:“元数据”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这已经被问了几次,但我一直没能做出任何的建议,为我工作。

我有一个网站和SQL数据库,我已经建立在本地,现在部署到Azure上。该数据库是一个链接资源的网站。我能够浏览网站,我甚至能够连接并使用ADO.Net和一个标准的连接字符串对数据库运行的查询。

问题是,当我尝试使用实体框架我不断收到不支持关键字连接:元数据我已经删除了多个活动记录集,并试图取代"与却一直没有工作。我完全被卡住的想法。


解决方案

下面是在Azure门户定义我的连接字符串,对于DatabaseFirst方式:

<$p$p><$c$c>metadata=res://*/mySuperModel.csdl|res://*/mySuperModelModel.ssdl|res://*/mySuperModel.msl;provider=System.Data.SqlClient;provider连接字符串=数据源= TCP:myServerName.database.windows.net,1433;初始目录= myDatabaseName;用户ID = MyUserName输入@ myServerName;密码= myPasswordHere;

与你和注意比较连接类型是定制在蔚蓝的门户网站。

This has been asked a few times but I haven't been able to make any of the suggestions work for me.

I have a website and SQL database that I've build locally and now deployed into Azure. The database is a linked resource to the website. I am able to browse the website and I'm even able to connect and run queries against the database using ADO.Net and a standard connection string.

The problem is when I try to connect using Entity Framework I keep getting Keyword not supported: 'metadata'. I've removed the multiple active record sets and tried replacing " with ' but it hasn't work. I'm completely stuck for ideas.

解决方案

Here is my connection string defined in the Azure portal, for a DatabaseFirst approach :

metadata=res://*/mySuperModel.csdl|res://*/mySuperModelModel.ssdl|res://*/mySuperModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=tcp:myServerName.database.windows.net,1433;Initial Catalog=myDatabaseName;User ID=myUserName@myServerName;Password=myPasswordHere;"

Compare with yours and note that the connection type is "custom" in the azure portal.

这篇关于Windows Azure的,实体框架。关键字不支持:“元数据”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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