Issue with Imultiple Results
-
Hi, suppose my SP returns 8 results sets i want to fetch only the 8th resultset....the issue which im facing with IMultipleResults.GetResult<> is it is not able to give the 8th resultset...and i need to call all the 7 resultsets before i call 8th resultset....and please let me know how to fetch the 8th resultset directly.... As this is possible in classic ado.net using tablemapping to fetch the desired result set ...please let me know how this can be achieved using Linq to Sql.. And i can"t chnage as my SP is used across other places of code where they coonsume some of the resultsets in 8 resultsets.... Please suggest me is there a way to fetch only the particular resultset from SP...
-
Hi, suppose my SP returns 8 results sets i want to fetch only the 8th resultset....the issue which im facing with IMultipleResults.GetResult<> is it is not able to give the 8th resultset...and i need to call all the 7 resultsets before i call 8th resultset....and please let me know how to fetch the 8th resultset directly.... As this is possible in classic ado.net using tablemapping to fetch the desired result set ...please let me know how this can be achieved using Linq to Sql.. And i can"t chnage as my SP is used across other places of code where they coonsume some of the resultsets in 8 resultsets.... Please suggest me is there a way to fetch only the particular resultset from SP...
What I have done in the past is capture each return in the mapping. So in your SPROC, comment out all but one of the selects. Then map the SPROC. You will then end up with an entity object. Copy the code for that object to another file. Rinse and repeat for all of the objects. Then you can specify which object. So if I have a SPROC
GetEmployee
but it also gets all of the Projects that the employee works on I can sayvar projects = GetResult<Projects>();
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.