Too many records on load

Hello
I have an Angular app, honest :slight_smile:, that i am loading customer records from a SQL database on page load. This data is to be used in a paged datagrid. However, when i load the application it throws an unhandled exception error on the data (see below)

InvalidOperationException: 'AsyncEnumerableReader' reached the configured maximum size of the buffer when enumerating a value of type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable1[ACustomerConsolidation.Models.Cs.VwCustomer]'. This limit is in place to prevent infinite streams of 'IAsyncEnumerable<>' from continuing indefinitely. If this is not a programming mistake, consider ways to reduce the collection size, or consider manually converting 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable1[ACustomerConsolidation.Models.Cs.VwCustomer]' into a list rather than increasing the limit.

How do i do this?
thanks

It seems that you are loading all records at once. Better use the DataGrid binding wizard to load your data with proper paging applied.

If i do this will i still be able to change the data on change of another item?
At the moment i have two list boxes with a parent\child relationship. the datagrid will be all of the records that arent yet linked with a child record. i was looking to control this by on change of the parent reload the datagrid based on the parent record selected.

Ignore the last message, i have used the datagrid wizard to do the datalink for me and that has put the paging in place (basically making sure that $top is set before calling the data) so i have just copied the calls on the change event and it works beautifully