I am trying to get a table from database using entity framework.
The table has reference to other table which again has reference to other tables. I know how to include other tables. And according to this answer and this MSDN page including multiple levels are like this:
entity.TableLevel1.Include(tLvl1=>tLvl1.TableLevel2.Select(tLvl2=>tLvl2.TableLevel3));
But my question is, how to include another table at level 3 ?
This seems not to work:
entity.TableLevel1
.Include(tLvl1=>tLvl1.TableLevel2
.Select(tLvl2=>tLvl2.TableLevel3)
.Select(tLvl2 => tLvl2.AnotherTableLevel3);