I am using Generic Repository Pattern for my recent project. Suppose my table has 100000 records and if I load all records at a time, it is taking too much time. i.e below mentioned method will return all records.
public async Task<IEnumerable<T>> GetAll()
{
return await dbSet.ToListAsync();
}
My UI layer is still waiting for 100000 records to load into the memory to bind my DOM in Jquery Datatable. Is there any mechanism to load 500 records in each call automatically or I have to implement this in mechanism in my business layer?