Beispiel #1
0
        static internal IDbCommand CreateCommand(string commandText, string connStr)
        {
            IDbCommand cmd = new SqlCommand(commandText);

            IDbConnection cn = SqlAzurePlugin.CreateConnection(connStr);

            cmd.Connection = cn;
            cn.Open();

            return(cmd);
        }
Beispiel #2
0
        public string GetDatabaseName()
        {
            IDbConnection cn     = SqlAzurePlugin.CreateConnection(context.ConnectionString);
            string        dbName = cn.Database;

            int index = dbName.LastIndexOfAny(new char[] { '\\' });

            if (index >= 0)
            {
                dbName = dbName.Substring(index + 1);
            }

            return(dbName);
        }
Beispiel #3
0
        public string GetFullDatabaseName()
        {
            IDbConnection cn = SqlAzurePlugin.CreateConnection(context.ConnectionString);

            return(cn.Database);
        }