Manually create expression tree from filter input
Is your feature request related to a problem?
Currently filtering only seems to work when returning an IQueryable. However, I'm calling a service that does not return a IQueryable; it does however accept a collection of Expressions as a parameters (which are in turn applied to a IQueryable inside that service).
The solution you'd like
I'd be great if there would be a way to manually build the expression tree based on a filter input parameter so I can do something like:
public Task<IEnumerable<User>> GetUsersAsync([Service] IUserService service, UserFilterInput filter)
{
return service.GetAllAsync(filter.ToExpressions());
}
Product
Hot Chocolate
Filtering actually can work on anything ... However it is often complex to implement a filtering provider and we see that. @PascalSenn and I have discussed working on a filter object that can be passed into business logic or translated to an object that can then be passed into business logic.
We have not yet a target date for this, I will put it for now on the 13.0 milestone but we might put it into a dot release for 12.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The filter object concept is very interesting to me, would be useful in my current project.
Is there another ticket that covers this idea? Dunno if anyone has had time to write up their thoughts on this.
@sjroesink Have you tried this solution? Link
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.