'PSQuery intersection
When querying with PSQuery it is very handy that two matching queries can be combined with Union. An example:
var queryPart1 = = es.PSQuery<A>().Where(..);
var queryPart2 = = es.PSQuery<B>().Where(..).Select(x => x.A);
var query = queryPart1.Union(queryPart2);
Is there a way to combine two queries by intersection? Following example does not work in our MDriven version but this would be very, very useful:
var queryPart1 = = es.PSQuery<A>().Where(..);
var queryPart2 = = es.PSQuery<B>().Where(..).Select(x => x.A);
var query = queryPart1.Intersection(queryPart2);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
