tags:

views:

445

answers:

3

Hi, i need select some fields from a table in the query using join, but in the select new statement i dont have acess from the fields of the join table.

var query = from p in persistencia.RequisicaoCompraItems

join s in persistencia.Suprimentos on p.SuprimentoID equals s.SuprimentoID

(i need get fields from this join)

group p by new {p.SuprimentoID, p.RequisicaoCompraItemID, p.RequisicaoCompraID } into x

                        from res in x

                        orderby x.Key.SuprimentoID

                        select new {res.SuprimentoID ,

                                    res.RequisicaoCompraItemID,

                                    **but in here i cant acess**  };

Cheers**

A: 

They're in res.Key.SuprimentoID etc

David Hedlund
A: 

not work , res.key(only show members of group by statement)

Kaneda
A: 

yes u right but i need

join s in persistencia.Suprimentos on p.SuprimentoID equals s.SuprimentoID

(i need get fields from this join)

Kaneda