ADO.NET中ExcuteReader读取存储过程获取的多行数据

DLL层调用:

                List<BookInfo> tupleList = new List<BookInfo>();
                using (IDataReader reader = this.AdoHelper.ExecuteReader(this.ConnectionString, CommandType.StoredProcedure, "FN_VOTEBOOKIDNAME_GET", paramArray))
                {
                    while (reader.Read())
                    {
                        BookInfo tuple = new BookInfo();
                        tuple.BookId = Field.GetInt32(reader, "BookId");
                        tuple.BookName = Field.GetString(reader, "bookname");
                        tupleList.Add(tuple);
                    }
                }
                return tupleList;
原文地址:https://www.cnblogs.com/zxx193/p/3421818.html