Ejemplo n.º 1
0
        /// <summary>
        /// will return current SQL Connector was connected to MS SQL or My SQL or SQLite DB
        /// </summary>
        /// <param name="settings">ISQLConnectionSettings</param>
        public static SqlAbstractConnector SetConnector(ISQLConnectionSettings settings)
        {
            SqlAbstractConnector sqlConnector = null;

            switch (settings.ProviderName)
            {
            case SQLProvider.SQLite:
            {
                sqlConnector = new SQLiteModelDBOperations(settings);
                break;
            }

            case SQLProvider.My_SQL:
            {
                sqlConnector = new MySQLUtils(settings);
                break;
            }

            case SQLProvider.MS_SQL:
            {
                sqlConnector = new MsSqlUtils(settings);
                break;
            }
            }
            return(sqlConnector);
        }
Ejemplo n.º 2
0
        static ModelCommonStringStore SQLite_Columns(ISQLConnectionSettings tmpSettings)
        {
            SqlAbstractConnector connector = new SQLiteModelDBOperations(tmpSettings);

            ModelCommonStringStore models = (connector as SQLiteModelDBOperations).GetColumns(tmpSettings.Table);

            return(models);
        }