ADO.NET에서 ExcuteReader가 스토리지 프로세스에서 가져온 여러 줄 데이터 읽기
1584 단어 reader
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;