-
Notifications
You must be signed in to change notification settings - Fork 128
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
Provide additional parameters to support provision of execution context to Load and LoadAsync #588
Comments
I have just put together a PR (#589) that shows what I am thinking. You would have different thoughts on how it should be done, but the solution works and shows the principle. The main thing this PR does is:
As I started out, I expect you may want to refactor the exact way this is done, but do you see the utility and would you be willing to implement in the root library? Here is an example of it in use (real world). This method:
Subsequently the operator is projected to a DTO, which is achieved using the same object passed in the runtimecontext - but that's part of my other library.
` |
OK - so I have expanded the scope of this somewhat. I have finally gotten around to implementing a non-intrusive integration of Automapper. PR is at #589. The PR is mainly to start a discussion about what (if any) you want in the main library. Anyone wanting an automapper-ready implementation in the meantime can pull https://github.com/statler/DevExtreme.AspNet.Data I will have a nuget up shortly |
OK - nuget package is available. Available as nuget at https://www.nuget.org/packages/DXAutomap.AspNet.Data/1.12.0 NuGet\Install-Package DXAutomap.AspNet.Data -Version 1.12.0 |
Hi Aleksey
Statler here - you may remember me from such posts as
So, just when I thought I had every base covered, I have come across a new use case that I need to manage. I am hoping you can help me out here.
My case deals successfully with automapper projection by:
This all works really well for ProjectTo(Mapconfig)
Where I have come unstuck is the overload of ProjectTo(Mapconfig, MapParameter) (https://docs.automapper.org/en/stable/Queryable-Extensions.html#parameterization)
This enables the injection of runtime variables into the projection and is a case I can't see a way to resolve as it is not possible to provide context in the CustomAccessors or CustomFilters. Would you be open to modifying the signatures for these methods to support the provision of context via an additional parameter to DataSourceLoader.LoadAsync / DataSourceLoader.Load
The text was updated successfully, but these errors were encountered: