I have a view for which I only want to retrieve certain columns, for two reasons:
-
Efficiency. Some of the columns are text fields that might be very long; I don't want to retreive them until I need them.
-
Filtering duplicates. SQL Server does not allow DISTINCT queries if there are text columns.
The ideal scenario would be to indicate to the (SelfServicing) collection which fields to retrieve. If a field is accessed that was not retrieved, it would be retrieved on demand. I realize LLBLGen doesn't have such a feaure, but it might be useful.
I know that I can built a custom dynamic list and populate a DataTable using TypedListDAO() but this is not very convenient.
At this point I will probably just define another view that contains only those fields I am interested in, and use this separate view for the DISTINCT query. But I was hoping there was a better way.
Is there?