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.
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.