Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. Issue with Imultiple Results

Issue with Imultiple Results

Scheduled Pinned Locked Moved LINQ
csharpsharepointdatabaselinqhelp
2 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siva455
    wrote on last edited by
    #1

    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...

    L 1 Reply Last reply
    0
    • S siva455

      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...

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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 say var 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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups