1、查询单表

				var pageSize = 2;//条数
var pageIndex = 2;//索引 var sql = @" SELECT D.*
FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY B_MemberId ASC ) AS rownum ,
*
FROM Bxy_MembersData
) AS D
WHERE rownum BETWEEN ( @pageIndex - 1 ) * @pageSize + 1
AND @pageIndex * @pageSize
ORDER BY B_MemberId ASC";
object[] sqlParameter =
{
new SqlParameter("@pageIndex",pageIndex),
new SqlParameter("@pageSize",pageSize),
};
var list = dataaccess.QueryList<Bxy_MembersData>(sql, sqlParameter);
04-28 16:02