LINQ how to get N number of rows form table starting from K index? Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of LINQ how to get N number of rows form table starting from K index? without wasting too much if your time.

The question is published on by Tutorial Guruji team.

like in the topic I need get further rows from my sqlite database using linq and merge them with my observableCollection. I have to start at some index and get for example 100 next rows when user is scrolling to the bottom of the list.

Thanks for help!

Answer

Use Skip and Take:

{query}.Skip(index).Take(100);

Note that this assumes a 0-based index (0 is the first record).

We are here to answer your question about LINQ how to get N number of rows form table starting from K index? - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji