@@ -158,7 +161,7 @@ public virtual IEnumerable<dynamic> Query(string sql, DbConnection connection, p
{
while(rdr.Read())
{
yieldreturnrdr.RecordToExpando();
yieldreturnrdr.RecordToExpando();;
}
}
...
...
@@ -417,7 +420,7 @@ public virtual dynamic Paged(string where = "", string orderBy = "", string colu
where="WHERE "+where;
}
}
varsql=string.Format("SELECT {0} FROM (SELECT ROW_NUMBER() OVER (ORDER BY {2}) AS Row, {0} FROM {3} {4}) AS Paged ",columns,orderBy,TableName,where);
varsql=string.Format("SELECT {0} FROM (SELECT ROW_NUMBER() OVER (ORDER BY {2}) AS Row, {0} FROM {3} {4}) AS Paged ",columns,pageSize,orderBy,TableName,where);
varpageStart=(currentPage-1)*pageSize;
sql+=string.Format(" WHERE Row >={0} AND Row <={1}",pageStart,(pageStart+pageSize));