三层业务类(DAL)必用的通用方法之一
时间:2010-11-29 来源:Stone_W
代码
#region SqlDataReader => List
/// <summary>
/// author:Stone_W
/// date:2010.11.29
/// desc:SqlDataReader 转 List
/// </summary>
/// <param name="dr">SqlDataReader</param>
/// <returns>List</returns>
private static List<object> sqlDrToList(SqlDataReader dr)
{
List<object> list = null;
if (null != dr)
{
list = new List<object>();
object o = new object();
while (dr.Read())
{
... // 业务
}
}
return list;
}
#endregion
相关阅读 更多 +