using (SqlDataReader reader = Dal.ExecuteReader(GetConnection(), "SelectProductAll"))
{
dsScrum.ProductTask.Clear();
if (reader.HasRows)
dsScrum.Product.Load(reader);
}
Is the same as:
SqlDataReader reader = Dal.ExecuteReader(GetConnection(),"SelectProductAll");
try
{
dsScrum.ProductTask.Clear();
if (reader.HasRows)
dsScrum.Product.Load(reader);
}
finally
{
if (reader != null)
reader.Dispose();
}
No comments:
Post a Comment