I have the code as shown below, this "get2Rows" stored procedure returns 2 rows, I want to get the 1st row and get the column values, and then the 2nd row and get the column values. How do I need iteration?
using (System.Data.Common.DbCommand dbCommand = DataAccess.Instance().Database.GetStoredProcCommand("get2Rows"))
{
using (IDataReader reader = DataAccess.Instance().Database.ExecuteReader(dbCommand))
{
while (reader.Read())
{
}
};
}
source
share