예제 #1
0
 /// <summary>
 /// Gets an array of <see cref="lkpCasepriorityRow"/> objects that
 /// match the search condition, in the the specified sort order.
 /// </summary>
 /// <param name="whereSql">The SQL search condition. For example:
 /// <c>"FirstName='Smith' AND Zip=75038"</c>.</param>
 /// <param name="orderBySql">The column name(s) followed by "ASC" (ascending) or "DESC" (descending).
 /// Columns are sorted in ascending order by default. For example: <c>"LastName ASC, FirstName ASC"</c>.</param>
 /// <param name="startIndex">The index of the first record to return.</param>
 /// <param name="length">The number of records to return.</param>
 /// <param name="totalRecordCount">A reference parameter that returns the total number
 /// of records in the reader object if 0 was passed into the method; otherwise it returns -1.</param>
 /// <returns>An array of <see cref="lkpCasepriorityRow"/> objects.</returns>
 public virtual lkpCasepriorityRow[] GetAsArray(string whereSql, string orderBySql,
                                                int startIndex, int length, ref int totalRecordCount)
 {
     using (IDataReader reader = _db.ExecuteReader(CreateGetCommand(whereSql, orderBySql)))
     {
         return(MapRecords(reader, startIndex, length, ref totalRecordCount));
     }
 }
예제 #2
0
 /// <summary>
 /// Gets an array of <see cref="aspnet_PersonalizationPerUserRow"/> objects that
 /// match the search condition, in the the specified sort order.
 /// </summary>
 /// <param name="whereSql">The SQL search condition. For example:
 /// <c>"FirstName='Smith' AND Zip=75038"</c>.</param>
 /// <param name="orderBySql">The column name(s) followed by "ASC" (ascending) or "DESC" (descending).
 /// Columns are sorted in ascending order by default. For example: <c>"LastName ASC, FirstName ASC"</c>.</param>
 /// <param name="startIndex">The index of the first record to return.</param>
 /// <param name="length">The number of records to return.</param>
 /// <param name="totalRecordCount">A reference parameter that returns the total number
 /// of records in the reader object if 0 was passed into the method; otherwise it returns -1.</param>
 /// <returns>An array of <see cref="aspnet_PersonalizationPerUserRow"/> objects.</returns>
 public virtual aspnet_PersonalizationPerUserRow[] GetAsArray(string whereSql, string orderBySql,
                                                              int startIndex, int length, ref int totalRecordCount)
 {
     using (IDataReader reader = _db.ExecuteReader(CreateGetCommand(whereSql, orderBySql)))
     {
         return(MapRecords(reader, startIndex, length, ref totalRecordCount));
     }
 }