我只是想知道,Entity Framework Connection String 到底是什么意思? 喜欢:
metadata=res://*/Models.Model1.csdl|res://*/Models.Model1.ssdl|res://*/Models.Model1.msl;provider=System.Data。 SqlClient;provider connection string="data source=testSource;initial catalog=CatalogName;user id=sa;password=************;multipleactiveresultsets=True;application name=EntityFramework"
我知道 provider=System.Data.SqlClient; provider connection string="data source=testSource; initial catalog=CatalogName; user id=sa; password=**
谁能告诉我 string metadata=res://*/Models.Model1.csdl|res://*/Models.Model1.ssdl|res://*/Models.Model1.msl 是什么;
什么意思?
而且,还有一件事我需要确认,如果我想在实体连接字符串中进行编辑,我可以这样做吗?
最佳答案
元数据字段在 EF 连接字符串中是必需的,并指定:
A pipe-delimited list of directories, files, and resource locations in which to look for model and mapping information.
或者换句话说:
The pointer to the metadata files (Conceptual Schema Definition Layer [CSDL], Mapping Schema Layer [MSL], and Store Schema Definition Layer [SSDL])
(来源:http://msdn.microsoft.com/en-us/library/orm-9780596520281-01-16.aspx)
关于c# - Entity Framework 连接字符串定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21134573/