To use Join, it is much better to use syntax instead of methods, since the Join() method has {4.5} parameters, which makes reading more difficult.
Still, answering your question, your query would be:
fornecedores.Join(contas, f => f.ID, c => c.FornecedorID, (f, c) => f);
Parameters:
1º: Collection to which you will join
2nd: Key to the first collection
3rd: Key to the second collection
4º: Function that returns the result item, is almost the same as using Select(), but takes two parameters, the first is the item of the first collection (suppliers), the second is the item of the second collection (accounts).
Why do you think it’s not so good?
– Maniero
To me it seems OK too, if the consultation was not working would be another conversation. :)
– Thiago Loureiro
The first query is much better than the 2nd. Because wants to trade one for another?
– João Martins
Actually wanted to know how it would look in methods (even in practice being the same result). I will edit the question.
– Vanderlei Pires