示例#1
0
        private static string GetServerLocation(List <DictionaryEntry> Ls)
        {
            string provider       = GetDBProvider(Ls);
            string serverLocation = GetDefaultServerLocation(TestDatabaseProviders.GetProvider(provider));

            return(serverLocation);
        }
示例#2
0
        private static TestDatabaseProviderInfo GetDefaultDBProvider()
        {
            // if Environment variable DB provider is defined, default DB provider == %DBProvider%
            // Default DB Provider is SQL2005
            string result = SafeGetEnvironmentVariableOrDefault("DbProvider", "SQL2005");

            return(TestDatabaseProviders.GetProvider(result));
        }
示例#3
0
 public static string GetDefaultServerLocation(string providerName)
 {
     return(TestDatabaseProviders.GetProvider(providerName).Location);
 }
示例#4
0
 private static string GetDBConnectionStringNoCreate(string dbName, List <DictionaryEntry> Ls)
 {
     try
     {
         string NewDBName = GetNewDBName(dbName);
         return("Server=" + GetServerLocation(Ls) + ";Database=" + NewDBName + ";" + TestDatabaseProviders.GetProvider(GetDBProvider(Ls)).Credentials);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         throw;
     }
 }
示例#5
0
 public static string GetDefaultServerDataFilePath(string providerName)
 {
     return(TestDatabaseProviders.GetProvider(providerName).DataFilePath);
 }
示例#6
0
 public static string GetDefaultServerCredentials(string providerName)
 {
     return(TestDatabaseProviders.GetProvider(providerName).Credentials);
 }