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. dataContext.storedProcedure(params).Skip(4).Take(3) - where is it executed

dataContext.storedProcedure(params).Skip(4).Take(3) - where is it executed

Scheduled Pinned Locked Moved LINQ
databasecsharplinqhelpquestion
7 Posts 3 Posters 7 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
    Seishin
    wrote on last edited by
    #1

    Hi! let's assume that the sproc returnes 20 rows. well, i know that the sproc is going to be executed on the DB but will Skip and Take do their stuff after the data (20 rows) from the sproc is returned to the application or will linq "do it's magic" and call converted to sql statements Skip and Take on the DB and return only 3 rows to the application? thanks for any help

    life is study!!!

    P P 2 Replies Last reply
    0
    • S Seishin

      Hi! let's assume that the sproc returnes 20 rows. well, i know that the sproc is going to be executed on the DB but will Skip and Take do their stuff after the data (20 rows) from the sproc is returned to the application or will linq "do it's magic" and call converted to sql statements Skip and Take on the DB and return only 3 rows to the application? thanks for any help

      life is study!!!

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      You can check this yourself. Load up SQL Profiler and execute a trace on your database. Step through your LINQ code in debug mode and observe what SQL statements are being executed against the database from the trace output.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      S 1 Reply Last reply
      0
      • S Seishin

        Hi! let's assume that the sproc returnes 20 rows. well, i know that the sproc is going to be executed on the DB but will Skip and Take do their stuff after the data (20 rows) from the sproc is returned to the application or will linq "do it's magic" and call converted to sql statements Skip and Take on the DB and return only 3 rows to the application? thanks for any help

        life is study!!!

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        Skip and Take will work on the data that has been returned from the stored procedure. There's no way that it could step into the SP and change its behaviour.

        Deja View - the feeling that you've seen this post before.

        My blog | My articles

        S 1 Reply Last reply
        0
        • P Pete OHanlon

          Skip and Take will work on the data that has been returned from the stored procedure. There's no way that it could step into the SP and change its behaviour.

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          S Offline
          S Offline
          Seishin
          wrote on last edited by
          #4

          hmm.. well I was wondering if linq can convert such a call into a query with exec sproc and select rows from the resluts of exec.. oh, well.. I'll have to work this paging problem some other way.. thanks for your reply!

          life is study!!!

          1 Reply Last reply
          0
          • P pmarfleet

            You can check this yourself. Load up SQL Profiler and execute a trace on your database. Step through your LINQ code in debug mode and observe what SQL statements are being executed against the database from the trace output.

            Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

            S Offline
            S Offline
            Seishin
            wrote on last edited by
            #5

            there's no profiler with sql express :/

            life is study!!!

            P 1 Reply Last reply
            0
            • S Seishin

              there's no profiler with sql express :/

              life is study!!!

              P Offline
              P Offline
              pmarfleet
              wrote on last edited by
              #6

              You might want to look at this[^] then.

              Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

              S 1 Reply Last reply
              0
              • P pmarfleet

                You might want to look at this[^] then.

                Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

                S Offline
                S Offline
                Seishin
                wrote on last edited by
                #7

                thanks a lot!!!

                life is study!!!

                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