映射xml文件书写如下
http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SqlMap.xsd">
usp_GetRecordset
程序代码如下:
public IList GetMemberList(string querystr,int pageNo)
{
Hashtable ht = new Hashtable();
ht.Add("querystr",querystr);
ht.Add("keyfield","id");
ht.Add("pagesize",2);
ht.Add("pagenumber",pageNo);
SqlMapper sqlMap = IBatisNet.DataMapper.Mapper.Instance();
try
{
return sqlMap.QueryForList("GetMemberList",ht);
}
catch(Exception e)
{
throw new IBatisNetException(e.Message,e);
}
}
本文介绍了一个使用IBatisNet实现分页查询的例子,包括映射XML配置及C#代码实现,展示了如何通过参数设置进行数据分页。
1257

被折叠的 条评论
为什么被折叠?



