How does Skip()
and Take()
work in Entity Framework when calling a stored procedure? I can't access sql profiler to check, but I want to make sure I optimize the amount of data sent between servers.
Say I have the following code, where MyStoredProcedure
returns 1000+ rows.
List<MyComplex_Result> myComplexList = db.MyStoredProcedure()
.Skip(50)
.Take(10);
Will the Take(10)
make sure that only 10 of those rows are sent from the database server to the web server, or will all 1000+ rows be sent (though only 10 would be sent to the client)?
I did encounter such requirements before. Originally, my option was to use stored procedure, but when I realize that data could be thousands, using SP no longer became applicable. Here are the two things I did to do this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With