private DataView InnerQuery(int startRowIndex, int maximumRows, string where, string orderBy, ref int totalCount)
        {
            QueryCondition qc = new QueryCondition(startRowIndex,
                                                   maximumRows, "*", this._DefaultTableName, orderBy, where);

            OnBuildQueryCondition(qc);

            CommonAdapter adapter = new CommonAdapter(GetConnectionName());

            DataView result = adapter.SplitPageQuery(qc, ref totalCount);

            ObjectContextCache.Instance[ContextCacheKey] = totalCount;

            return(result);
        }
        private TCollection InnerQuery(int startRowIndex, int maximumRows, string where, string orderBy, ref int totalCount)
        {
            QueryCondition qc = new QueryCondition(startRowIndex,
                                                   maximumRows, "*", GetMappingInfo().TableName, orderBy, where);

            OnBuildQueryCondition(qc);

            CommonAdapter adapter = new CommonAdapter(GetConnectionName());

            TCollection result = adapter.SplitPageQuery <T, TCollection>(qc, this.OnDataRowToObject, ref totalCount);

            ObjectContextCache.Instance[ContextCacheKey] = totalCount;

            return(result);
        }