EF 6儿童组由

时间:2014-04-25 20:03:47

标签: entity-framework

我有两个实体设置如下:

public class Operator : Base
{
    public String Name { get; set; }
    public String Description { get; set; }

    public virtual ICollection<Address> Addresses { get; set; }
}

public class Address : Base
{
    public String House { get; set; }
    //...
    public String Type{ get; set; }

    public int? ParentOperatorId { get; set; }
    public virtual Operator ParentOperator { get; set; }
}

这很好用。我想要做的是当我通过Addresses.Type

获取操作员组子地址时

谢谢!

0 个答案:

没有答案