>>Nope it's bidirectional you get a link to the parent in the child and an EntitySet<T> collection of children in the parent. >>
> var CustomerList = (from p in db.job_info > join c in db.customers on p.cust_num equals c.custno > where p.status == 'A' > orderby c.company > select new { custno = c.custno, c.company, c.phone, c.faxno } > ).Distinct(); >>
> var subq = (from p in db.job_info > where p.status == 'A' > orderby p.customer_source.company > select p.customer_source.custno).Distinct(); > > IQueryable<customer_source> CustomerList = from a in db.customers > where subq.Contains(a.custno) > select a; >>
> IQueryable<customer_source> CustomerList = (from p in db.job_info > where p.status == 'A' > orderby p.customer_source.company > select p.customer_source <---- the magic occurs here > ).Distinct();