Using Entity Framework for SQL Compact Edition 3.5 does not respect mode=exclusive property of conne

Posted by AJ on Stack Overflow See other posts from Stack Overflow or by AJ
Published on 2010-04-15T16:56:26Z Indexed on 2010/05/16 1:10 UTC
Read the original article Hit count: 276

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about entity-framework