Grid.Blazor
Grid.Blazor copied to clipboard
GridCoreServer taking an IQueryable
Is your feature request related to a problem? Please describe.
My backend storage provides me with an IQueryable<T>, but GridCoreServer<T> requires an IEnumerable<T>. Given a huge amount of items in storage, I do not want to enumerate them all at once.
Describe the solution you'd like
A GridCoreServer<T> that takes an IQueryable<T>.
Describe alternatives you've considered
Implementing my own private IGridServer<T>. However, this seems to be a feature generally useful for other projects as well.
You can use IQueryable<T> as GridCoreServer<T`> parameter, because IQueryable<T> has inheritance of IEnumerable<T>.
If the number of records is high, I would use pagination:
IGridServer<Order> server = new GridCoreServer<Order>(repository.GetAll(), Request.Query,
true, "ordersGrid", ColumnCollections.OrderColumns)
.WithPaging(10);