問題:
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