Example #1
0
        /// <summary>
        /// 获取数据库操作对象
        /// </summary>
        /// <param name="connectInfo"></param>
        /// <returns></returns>
        private BaseDbActionService GetDbConnection(ConnectInfo connectInfo)
        {
            if (HasConnect(connectInfo))
            {
                connectInfo = GetConnectInfo(connectInfo);
                return(connectInfo.DbService);
            }
            connectInfo.DbService = DataBaseFactory.DbServerFactory(connectInfo);
            AddConnectionInfo(connectInfo);

            return(connectInfo.DbService);
        }
Example #2
0
        private SqlDataBaseService.sqlAction.BaseDbActionService GetDbConnection(SqlDataBaseService.ConnectInfo connectInfo)
        {
            bool flag;

            SqlDataBaseService.sqlAction.BaseDbActionService service;
            if ((this.HasConnect(connectInfo) == 0) == null)
            {
                goto Label_0026;
            }
            connectInfo.DbService = DataBaseFactory.DbServerFactory(connectInfo);
            this.AddConnectionInfo(connectInfo);
Label_0026:
            connectInfo = this.GetConnectInfo(connectInfo);
            service     = connectInfo.DbService;
Label_0038:
            return(service);
        }