Skip to content

Provide additional parameters to support provision of execution context to Load and LoadAsync #588

@statler

Description

@statler

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:

  1. Registering CustomAccessors automatically from the automapper config (Support AutoMapper's ProjectTo in DataSourceLoader #367)
  2. Getting the IDs of all results from the Devexpress.AspNet.data expression compilation query
  3. Querying the base type for all ids in (2), and using ProjectTo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions