It can be done but requires a lot more code. FetchQueryFromSource
calls FetchProjection(List<IDataValueProjector> valueProjectors, IGeneralDataProjector projector, IRetrievalQuery queryToExecute)
, where you pass in a DataProjectorToObjectList
. You can also go the route of adapter.FetchProjection
and setup the projection using that method, the caching parameters are set on the IRetrievalQuery anyway, so any projection method works (as long as you setup the projection properly of course).
However as the stored procedure resultset is likely fixed, setting up the projection in the designer and generate the code for obtaining the projection from the stored proc seems easier to me.