问题:
I'm initializing Entity Framework Object context, and this gives me the keyword not supported error:我正在初始化实体框架对象上下文,这给了我关键字不支持的错误:
metadata=res://*/MainDB.csdl|res://*/MainDB.ssdl|res://*/MainDB.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\\SQLEXPRESS;AttachDbFilename=D:\\Workspace\\vs\\Leftouch\\Leftouch.Web\\Data\\Leftouch.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;App=EntityFramework"
I took the connection string directly from web.config which was working, and modified only the path to the file (which I set dynamically), and instead of using the default value, used this connection string explicitly.我直接从正在工作的 web.config 中获取连接字符串,并且只修改了文件的路径(我动态设置的),而不是使用默认值,而是显式使用了这个连接字符串。 What could cause this error?什么可能导致此错误?
解决方案:
参考一: https://en.stackoom.com/question/TMFP参考二: https://stackoom.com/question/TMFP