If I select from an IQueryable then the Include is lost

前端 未结 1 559
猫巷女王i
猫巷女王i 2020-12-19 03:36

The include does not work after I perform a select on the IQueryable query. Is there a way around this? My query is

public IQueryab         


        
相关标签:
1条回答
  • 2020-12-19 03:46

    Here's an explanation of what's happening, with a workaround.

    In your case, however, I think there's a better workaround than what's in that linked article. You're already using a view model for Network. That's good! Do it for contact (and it's related properties), too, and your problems with eager loading will magically go away. Projection always works.

    0 讨论(0)
提交回复
热议问题