public static ISisoDatabase CreateSqlCe4Db(this string connectionStringOrName) { var cnInfo = new SqlCe4ConnectionInfo(connectionStringOrName); var factory = new SqlCe4DbFactory(); return factory.CreateDatabase(cnInfo); }
public void WhenPassingEnlistTrue_EnlistBecomesFalse() { var cnInfo = new SqlCe4ConnectionInfo(@"data source=d:\#Temp\SisoDb\SisoDbTestsTemp.sdf;Enlist=True"); Assert.AreEqual(@"Data Source=d:\#Temp\SisoDb\SisoDbTestsTemp.sdf;Enlist=False", cnInfo.ServerConnectionString); Assert.AreEqual(@"Data Source=d:\#Temp\SisoDb\SisoDbTestsTemp.sdf;Enlist=False", cnInfo.ClientConnectionString); }
public static ISisoDatabase CreateSqlCe4Db(this string connectionStringOrName) { var cnInfo = new SqlCe4ConnectionInfo(connectionStringOrName); var factory = new SqlCe4DbFactory(); return(factory.CreateDatabase(cnInfo)); }
public SqlCe4ServerClient(SqlCe4ConnectionInfo connectionInfo, IConnectionManager connectionManager, ISqlStatements sqlStatements) { Ensure.That(connectionInfo, "connectionInfo").IsNotNull(); Ensure.That(connectionManager, "connectionManager").IsNotNull(); Ensure.That(sqlStatements, "sqlStatements").IsNotNull(); _connectionInfo = connectionInfo; _connectionManager = connectionManager; _sqlStatements = sqlStatements; }
public void WhenPassingNormalCnString_ItRocks() { var cnInfo = new SqlCe4ConnectionInfo(@"data source=d:\#Temp\SisoDb\SisoDbTestsTemp.sdf;"); Assert.AreEqual(StorageProviders.SqlCe4, cnInfo.ProviderType); Assert.AreEqual(@"Data Source=d:\#Temp\SisoDb\SisoDbTestsTemp.sdf;Enlist=False", cnInfo.ServerConnectionString); Assert.AreEqual(@"Data Source=d:\#Temp\SisoDb\SisoDbTestsTemp.sdf;Enlist=False", cnInfo.ClientConnectionString); Assert.AreEqual("SisoDbTestsTemp", cnInfo.DbName); Assert.AreEqual(@"d:\#Temp\SisoDb\SisoDbTestsTemp.sdf", cnInfo.FilePath); }