Entity Framework and forced Inner Join

前端 未结 3 1862
难免孤独
难免孤独 2020-12-03 17:23

I have Table1 with the following relationships (they are not enforced they only create the relationship for the navigation properties)

Table1 (*)->(1) Table2
Tabl         


        
3条回答
  •  半阙折子戏
    2020-12-03 18:25

    in EF when doing IQueryable.Include() if none of the navigation properties are based on an enforced relationship then EF will use the first table. It expects that at least one of the relationships is enforced in the schema and that one should be coded with the IQueryable.Include() first, then add the other tables with Include()

提交回复
热议问题