I'm trying to load a list of entities, with 2 conditions which I'm passing with a list of Tuple. See:
private IEnumerable<Invoice> FindInvoices(IEnumerable<Tuple<int, int>> vars) { ... }
Now, I'm having truble to how to join the main entity-set with the input parameters:
private IEnumerable<Invoice> FindInvoices(IEnumerable<Tuple<int, int>> vars) {
var q = from i in context.Invoices
join v in vars on
i.Prop1 == v.Item1
// HERE IS THE PROBLEM. THERE IS NO "&&" or "and" to apply:
&& i.Prop2 == v.Item2
}
As you can see, since there is no && or and support, I cannot apply the second condition to clause. So, how can I write a join with 2 conditions in on clause?
OR can you suggest any alternative? Thanks in advance.