Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotvvmFacadeExtensions.FillDataSet should extend ICrudListFacade/ICrudFilteredListFacade types, not the ones that include TDetailDTO #36

Open
vstribrny opened this issue Aug 29, 2018 · 0 comments

Comments

@vstribrny
Copy link

I am facing a problem while trying to use DotvvmFacadeExtensions.FillDataSet extension method. It extends ICrudFilteredFacade<TListDTO, TDetailDTO, TFilterDTO, TKey> / ICrudFacade<TListDTO, TDetailDTO, TKey>, but the method implementation does not work/need TDetailDTO objects.

I think DotvvmFacadeExtensions.FillDataSet should extend ICrudListFacade<TListDTO> / ICrudFilteredListFacade<TListDTO, TFilterDTO> (they are the base for interfaces those full-CRUD interfaces anyway), which makes more sense to me. The only issue is that these interfaces does not implement IFacade (to get UnitOfWorkProvider) - I feel like it is omitted "by accident"; or is it an intention?

Resulting method signatures could be:

  • public static void FillDataSet<TListDTO>(this ICrudListFacade<TListDTO> facade, GridViewDataSet<TListDTO> dataSet)

  • public static void FillDataSet<TListDTO, TFilterDTO>(this ICrudFilteredListFacade<TListDTO, TFilterDTO> facade, GridViewDataSet<TListDTO> dataSet, TFilterDTO filter)

My use-case: I have a DotVVM ViewModel for list-like page with injected ICrudFilteredListFacade<TListDTO, TFilterDTO> object and I would like fill DataSet in PreRender method.

@vstribrny vstribrny changed the title DotvvmFacadeExtensions.FillDataSet should extend ICrudListFacade/ICrudFilteredListFacade types, not the ones that includes TDetailDTO DotvvmFacadeExtensions.FillDataSet should extend ICrudListFacade/ICrudFilteredListFacade types, not the ones that include TDetailDTO Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant