RAD Tool Issues - SQL Selecting entire table (instead of only the page) #6643
The view table page have a problem after generated with the RAD Tool. Each record being queried are inserted into a GetXXXXXXXForViewDto object before it is sorted / paged. Problem with this is that it needs to get ALL the records in the table into these objects before it can sort / page the data. Sorting is then also done incorrectly on the GetXXXXXXXForViewDto object's inner object instead of directly on the entity.
I have to change this everytime it re-generates to only put the record into GetXXXXXXXForViewDto object AFTER the sorting and paging happened. I am doing my own sorting / paging manually (SQL LINQ query using OrderBy / OrderByDescending with Skip / Take) so that it only queries that page of data from the DB.
Initially performance is not a problem here but as the table grows the problem grows with it. I actually found this issue by changing the AppService to point to a totally different DB table that is very big. Off course the ability to point to a differtent Database table in the RAD tool is a different problem...