public static ISisoDatabase CreateSql2005Db(this string connectionStringOrName)
        {
            var cnInfo = new Sql2005ConnectionInfo(connectionStringOrName);
            var factory = new Sql2005DbFactory();

            return factory.CreateDatabase(cnInfo);
        }
Exemplo n.º 2
0
        public static ISisoDatabase CreateSql2005Db(this string connectionStringOrName)
        {
            var cnInfo  = new Sql2005ConnectionInfo(connectionStringOrName);
            var factory = new Sql2005DbFactory();

            return(factory.CreateDatabase(cnInfo));
        }
        public void WhenExplicitlyPassingMarsFalse_ItBecomesTrue()
        {
            var cnInfo = new Sql2005ConnectionInfo(@"data source=.;initial catalog=SisoDbTests.Temp;integrated security=SSPI;MultipleActiveResultSets=False");

            Assert.AreEqual(StorageProviders.Sql2005, cnInfo.ProviderType);
            Assert.AreEqual(@"Data Source=.;Initial Catalog=;Integrated Security=True;MultipleActiveResultSets=True", cnInfo.ServerConnectionString);
            Assert.AreEqual(@"Data Source=.;Initial Catalog=SisoDbTests.Temp;Integrated Security=True;MultipleActiveResultSets=True", cnInfo.ClientConnectionString);
            Assert.AreEqual("SisoDbTests.Temp", cnInfo.DbName);
        }