J
Jeff
hi
asp.net 2.0
if no records exists in the database then an exception will be thrown in
GetPictureFromReader.
I want to perform a check on reader before calling GetPictureFromReader. so
only call GetPictureFromReader if records exists in reader..
how should I perform souch a test?
protected virtual List<PictureDetail>
GetPictureCollectionFromReader(IDataReader reader)
{
List<PictureDetail> pictures = new List<PictureDetail>();
while (reader.Read())
pictures.Add(GetPictureFromReader(reader));
return pictures;
}
asp.net 2.0
if no records exists in the database then an exception will be thrown in
GetPictureFromReader.
I want to perform a check on reader before calling GetPictureFromReader. so
only call GetPictureFromReader if records exists in reader..
how should I perform souch a test?
protected virtual List<PictureDetail>
GetPictureCollectionFromReader(IDataReader reader)
{
List<PictureDetail> pictures = new List<PictureDetail>();
while (reader.Read())
pictures.Add(GetPictureFromReader(reader));
return pictures;
}