Missing SelectAllAsList Methods

Feb 25, 2009 at 2:47 PM

I just retrofitted the new version of the assembly into an older application that used a previous version and the application started throwing errors on a grid that was being populated from an ObjectDataSource that was using SelectAllAsList as it's select method, looking at the updated code it appears that the SelectAllAsList methods that return subsets of the results, or use sort terms have been removed leaving only the SelectAllAsList that returns the entire table.

Is there any particular reason for the change, or should I be retrieving the data in a different way with the new assembly?


Apr 9, 2009 at 2:19 PM
Yes you're right it has gone, I think we decided that it was a bit redundant because you could just use the selectAll methods and then call ToList(). If you think you need it I could add it back in?
Jul 6, 2009 at 9:44 AM

It's useful to have them in, in my case for using with an ObjectDataSource and a grid  - I have been directly calling SelectAllAsList as the Select method on the GenericObjectDataSource. Whilst using SelectAll instead will work with the query, using SelectAll causes the paging controls in the grid to work incorrectly as the code within the grid control cannot work out whether it needs to activate or deactivate the next/previous controls. Looking at the grid control it appears that the PageIndex and PageCount properties come back as 0 and 1, even if there are more results, if ToList is not used to force LINQ to enumerate the results before passing them to the grid.

Although it could be argued that the grid is at fault, it is a lot more straightforward just to use an equivalent of the AsList method instead, so if you could add them back in that would be great,