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
{{ message }}
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
I'm struggling on managing correctly the EFCore DbContext lifecycle in a project using BlazorTable.
If I define as ItemsQueryable parameter on the component a DbSet from the context, as Microsoft guidelines suggest, I dispose it on every request, resulting BlazorTable to thron ObjectDisposedException. The only workaround is keeping the context alive through all the application, which is not adviceable.
The idea is to provide another parameter to the component called ItemsQueryableFactory which accepts a Func<IQueryable> which allows the component to be provided a new IQueryable every time it needs and allowing the application using the component to follow the context lifecycle guidelines.
The text was updated successfully, but these errors were encountered:
I'm struggling on managing correctly the EFCore DbContext lifecycle in a project using BlazorTable.
If I define as ItemsQueryable parameter on the component a DbSet from the context, as Microsoft guidelines suggest, I dispose it on every request, resulting BlazorTable to thron ObjectDisposedException. The only workaround is keeping the context alive through all the application, which is not adviceable.
The idea is to provide another parameter to the component called ItemsQueryableFactory which accepts a Func<IQueryable> which allows the component to be provided a new IQueryable every time it needs and allowing the application using the component to follow the context lifecycle guidelines.
The text was updated successfully, but these errors were encountered: