score:3

Accepted answer

basically, you have to condense your where clause into a single where clause after all of the navigations (from) have been performed, like so:

var query = 
    from ch in client.wcf.context.cashheading
    from cs in client.wcf.context.cash
    from gg in client.wcf.context.good
    where 
        ch.id_customer == customern && //cc.id
        cs.id_cashheading == ch.id &&
        gg.id == cs.id_good
    select gg.price.value;

granted, this doesn't seem optimal, as it would seem that it's going to do cross join all of the tables and then perform the filtering, but remember, you're probably dealing with iqueryable<t> interface implementations, meaning that this will more than likely be interpreted and then optimized by whatever handles the translated queries.


Related Query

More Query from same tag