public List<Field> list(string where,int skip,int limit)
{
if (!string.IsNullOrEmpty(where))
{
where = "where" + where;
}
// return mapSiteDao.CreateQuery<Field>("select value fd from Field as fd" + where).ToList();
ObjectQuery<Field> query = mapSiteDao.CreateQuery<Field>("select value fd from Field as fd" + where + " order by fd.FieldId skip @skip limit @limit");
query.Parameters.Add(new ObjectParameter("skip", skip * limit));
query.Parameters.Add(new ObjectParameter("limit",limit));
return query.ToList();
}
这里定义了参数
public List<Field> list(string where, int skip, int limit)
{
return fieldDao.list(where,1,10);
}
<td colspan="3"><a href='../../Field/list/?skip=0&limit=10'>首页</a> <a href='#'>上一页</a> <a href='#'>下一页</a> <a href=''>末页</a> 第<input type='text' size='1' />页</td>
这里在页面里面怎么获取路径和计算上一页,下一页啊?