Esempio n. 1
0
        /// <summary>
        /// Start the asynchronous query request operation.
        /// </summary>
        /// <param name="dataBase">The base generic data access layer.</param>
        /// <param name="callback">The asynchronous call back method.</param>
        /// <param name="state">The state object value.</param>
        /// <param name="queryText">The query text to execute.</param>
        /// <param name="commandType">The command type.</param>
        /// <param name="values">The collection of sql parameters to include.</param>
        public AsyncSelectDataEntities(ISelectDataGenericBase <TDataEntity> dataBase,
                                       AsyncCallback callback, object state, string queryText, CommandType commandType,
                                       params DbParameter[] values)
            : base(callback, state)
        {
            _dataBase    = dataBase;
            _values      = values;
            _queryText   = queryText;
            _commandType = commandType;

            ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncSelectThread1));
            Thread.Sleep(20);
        }