EF Code First - Include(x => x.Properties.Entity) a 1 : Many association

后端 未结 3 1824
借酒劲吻你
借酒劲吻你 2020-12-13 18:08

Given a EF-Code First CTP5 entity layout like:

public class Person { ... }

which has a collection of:

public class Address {

3条回答
  •  忘掉有多难
    2020-12-13 18:15

    For that you can use the Select method:

    PersonQuery.Include(x => x.Addresses.Select(a => a.Mailbox));
    

    You can find other examples in here and here.

提交回复
热议问题