예제 #1
0
 /// <summary>
 /// Query the rows from the database by batch.
 /// </summary>
 /// <param name="page">The page of the batch to be used. This is a zero-based index (the first page is 0).</param>
 /// <param name="rowsPerBatch">The number of data per batch to be returned.</param>
 /// <param name="orderBy">The order definition of the fields to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>An enumerable list of data entity objects.</returns>
 public IEnumerable <TEntity> BatchQuery(int page,
                                         int rowsPerBatch,
                                         IEnumerable <OrderField> orderBy,
                                         string hints = null,
                                         IDbTransaction transaction = null)
 {
     return(DbRepository.BatchQuery <TEntity>(page: page,
                                              rowsPerBatch: rowsPerBatch,
                                              orderBy: orderBy,
                                              hints: hints,
                                              transaction: transaction));
 }
예제 #2
0
 /// <summary>
 /// Query the rows from the database by batch.
 /// </summary>
 /// <param name="page">The page of the batch to be used. This is a zero-based index (the first page is 0).</param>
 /// <param name="rowsPerBatch">The number of data per batch to be returned.</param>
 /// <param name="orderBy">The order definition of the fields to be used.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="fields">The list of <see cref="Field"/> objects to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>An enumerable list of data entity objects.</returns>
 public IEnumerable <TEntity> BatchQuery(int page, int rowsPerBatch,
                                         IEnumerable <OrderField> orderBy,
                                         Expression <Func <TEntity, bool> > where = null,
                                         IEnumerable <Field> fields = null,
                                         string hints = null,
                                         IDbTransaction transaction = null)
 {
     return(DbRepository.BatchQuery <TEntity>(page: page,
                                              rowsPerBatch: rowsPerBatch,
                                              orderBy: orderBy,
                                              where : where,
                                              fields: fields,
                                              hints: hints,
                                              transaction: transaction));
 }
예제 #3
0
 /// <summary>
 /// Query the rows from the database by batch.
 /// </summary>
 /// <param name="tableName">The name of the target table.</param>
 /// <param name="page">The page of the batch to be used. This is a zero-based index (the first page is 0).</param>
 /// <param name="rowsPerBatch">The number of data per batch to be returned.</param>
 /// <param name="orderBy">The order definition of the fields to be used.</param>
 /// <param name="where">The dynamic expression to be used.</param>
 /// <param name="fields">The list of <see cref="Field"/> objects to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>An enumerable list of data entity objects.</returns>
 public IEnumerable <TEntity> BatchQuery(string tableName,
                                         int page,
                                         int rowsPerBatch,
                                         IEnumerable <OrderField> orderBy,
                                         object where = null,
                                         IEnumerable <Field> fields = null,
                                         string hints = null,
                                         IDbTransaction transaction = null)
 {
     return(DbRepository.BatchQuery <TEntity>(tableName: tableName,
                                              page: page,
                                              rowsPerBatch: rowsPerBatch,
                                              orderBy: orderBy,
                                              where : where,
                                              fields: fields,
                                              hints: hints,
                                              transaction: transaction));
 }