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
GridBase.PreProcess uses sync Count call https://github.com/gustavnavar/Grid.Blazor/blob/master/GridCore/GridBase.cs#L52 In case of sync data source it will be normal behavior. But when we try use own data source (for example based on HttpClient data fetcher) we will get dead-lock here. I recommend use approach based on CountAsync method. Unfortunately, the method is available for EF data source only. So the best way will be introduce some interface-extension to let use code override on own source and make Count in async mode.
Sure, as a best code practice I recommend introduce cancellation token every where where is this call be.
I have my own implementation and can share it, but my approach is change underlying Expression tree to put CountAsync method call. Very non-generic.
The text was updated successfully, but these errors were encountered:
GridBase.PreProcess uses sync Count call https://github.com/gustavnavar/Grid.Blazor/blob/master/GridCore/GridBase.cs#L52 In case of sync data source it will be normal behavior. But when we try use own data source (for example based on HttpClient data fetcher) we will get dead-lock here. I recommend use approach based on CountAsync method. Unfortunately, the method is available for EF data source only. So the best way will be introduce some interface-extension to let use code override on own source and make Count in async mode.
Sure, as a best code practice I recommend introduce cancellation token every where where is this call be.
I have my own implementation and can share it, but my approach is change underlying Expression tree to put CountAsync method call. Very non-generic.
The text was updated successfully, but these errors were encountered: