使用 Entity Framework for SQL Compact Edition 3.5 不尊重连接字符串的 mode=exclusive 属性
我正在使用带有实体框架的 SQL Server Compact 3.5 版本,并且我希望对数据库具有独占锁定,如此处所述 http://msdn.microsoft.com/en-us/library/ms171817.aspx。
但是,当您将其通过连接字符串传递给实体框架时,它根本不尊重这一点。
连接字符串的示例如下
private static readonly string _ConnectionStringFormat =
@"metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl; provider=System.Data.SqlServerCe.3.5; provider connection string='Data Source={0};Mode=Exclusive'";
如果有人以前遇到过此问题并找到了如何解决此问题,请告诉我。
谢谢 阿杰
I am using SQL Server Compact 3.5 edition with Entity Framework and I want to have exclusive lock on the database as documented here http://msdn.microsoft.com/en-us/library/ms171817.aspx.
However when you pass this in a connection string to Entity Framework it does not respect this at all.
An example of the connection string as following
private static readonly string _ConnectionStringFormat =
@"metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl; provider=System.Data.SqlServerCe.3.5; provider connection string='Data Source={0};Mode=Exclusive'";
If anyone has come across this issue before and have found out how to resolve this, then please let me know.
Thanks
Aj
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论