Entity Framework - eager loading of related entities

前端 未结 3 899
無奈伤痛
無奈伤痛 2021-02-14 21:44

Sorry the title isn\'t more specific - I didn\'t know how to describe this succinctly. I have Trips and Location that have a many-to-many relationship - straightforward except t

3条回答
  •  囚心锁ツ
    2021-02-14 22:08

    Remove the VIRTUAL keyword on your relationship properties e.g.Location, that will disable Lazy Loading and force you to eager load.

提交回复
热议问题