You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, TableController.Query relies on the fact that IRepository<T> exposes an IQueryable<T> and can be used by OData directly to produce results. OData uses synchronous methods (Count() and ToList()) on top of LINQ to produce results.
Cosmos recently (EF Core 9) instituted a change that puts support of synchronous methods on a deprecation path. Aside from that, most EF Core drivers do "sync over async", which has known issues.
This task would move the TableController.Query from using the OData query processor directly (and hence falling afoul of the sync methods) to doing everything piecemeal.
There are four parts to the query process:
Filter
Ordering
Skip/Take (paging)
Selection
By splitting these steps out (rather than using the OData library version), we can avoid the sync methods and call repository specific versions (Repository.CountAsync and Repository.ToListAsync) that can "do the right thing" for async methods.
This requires:
Adding Repository.CountAsync and Repository.ToListAsync to the IRepository with default implementations.
Splitting up TableController.Query so that the OData library version is not used (and doing filter, ordering, skip/take, and selection separately)
Adding "live" controller tests to the Server.Test library to assure us of the efficacy of the change across all supported databases.
The text was updated successfully, but these errors were encountered:
Currently,
TableController.Query
relies on the fact thatIRepository<T>
exposes anIQueryable<T>
and can be used by OData directly to produce results. OData uses synchronous methods (Count()
andToList()
) on top of LINQ to produce results.Cosmos recently (EF Core 9) instituted a change that puts support of synchronous methods on a deprecation path. Aside from that, most EF Core drivers do "sync over async", which has known issues.
This task would move the TableController.Query from using the OData query processor directly (and hence falling afoul of the sync methods) to doing everything piecemeal.
There are four parts to the query process:
By splitting these steps out (rather than using the OData library version), we can avoid the sync methods and call repository specific versions (Repository.CountAsync and Repository.ToListAsync) that can "do the right thing" for async methods.
This requires:
The text was updated successfully, but these errors were encountered: