public override List <ProductPhoto> GetProductPhotoList() { List <ProductPhoto> list = new List <ProductPhoto>(); using (SqlConnection connection = this.GetSqlConnection()) { string cmdText = "select * from SuCommerce_Photos"; SqlCommand command = new SqlCommand(cmdText, connection) { CommandType = CommandType.Text }; connection.Open(); using (SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection)) { ProductPhoto photo = null; while (reader.Read()) { photo = new ProductPhoto(); CommerceDataProvider.PopulateProductPhotoList(reader, photo); list.Add(photo); } reader.Close(); connection.Close(); } } return(list); }