EF7 beta5: Foreign Key returns null value

后端 未结 1 685
Happy的楠姐
Happy的楠姐 2021-01-24 09:55

I have created an API using ASP.NET5 and Entity Framework 7.0.0-beta 5.

I have the Model, DbContext and the Repository created, and when I try to retrieve data from my

1条回答
  •  耶瑟儿~
    2021-01-24 10:36

    Lazy loading isn't implemented yet in EF7. Use the following query to eagerly-load the related entities instead.

    _dbcontext.Company.Include(c => c.Status).ToList();
    

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