Пример #1
0
        public static DbUtility GetDbUtility(DbProviderType dbProviderType)
        {
            if (null == dbUtility)
            {
                SQLConnectControl sqlConnectControl = new SQLConnectControl();
                SQLConnModel      sqlConn           = new SQLConnModel();

                sqlConn   = sqlConnectControl.InitConnectConfigDB();
                dbUtility = new DbUtility(sqlConn, dbProviderType);
            }

            return(dbUtility);
        }
Пример #2
0
        public static DbUtility GetDefaultDbUtility()
        {
            if (null == dbUtility)
            {
                SQLConnectControl sqlConnectControl = new SQLConnectControl();
                SQLConnModel      sqlConnModel      = new SQLConnModel();

                sqlConnModel = sqlConnectControl.InitConnectConfigDB();
                dbUtility    = new DbUtility(sqlConnModel, DbProviderType.MySql);
            }

            return(dbUtility);
        }