0

I am using lightswitch and i have to join 3 tables in my query. Table A join Table B join table C where tableC.id == 10

partial void Query2_PreprocessQuery(int? dept, ref IQueryable query) {

    query = query.Join(Employee_Personal_Infoes, b => b.Employee_Personal_Info1.Emp_id, (b));

}
Maverick1415
  • 113
  • 1
  • 12

1 Answers1

0

First off, if you add relationships between your tables, you shouldn't ever need to do manual joins. You would then just use the navigation properties that get created when you add the relationships.

Second, you can't change the shape of the entity in a query, or return a set of different entities. If your query is based say on a Customer entity, you can't return a query of CustomerAdresses, or a Client entity from that query. The query can only return a filtered set of the same entity that the query is based on.

Does that make sense?

Yann Duran
  • 3,842
  • 1
  • 24
  • 24
  • http://stackoverflow.com/questions/21170173/accessing-static-variable-over-different-projects-in-lightswitch please check this question. – Maverick1415 Jan 16 '14 at 18:41
  • Sorry, I'm not quite sure why you've referred me to that link. But the answer to the question you've asked there is that you *can't* share static variables using the Common project in the manner described. The why is a little complicated to put in a comment here. Don't worry, it's a common mistake to make. – Yann Duran Jan 17 '14 at 02:45