如何在ADO .NET实体框架中将Array添加为属性

时间:2010-10-15 09:05:07

标签: c# .net ado.net

我正在为应用程序使用自定义数据服务提供程序。

我需要将以下类添加为实体

public class PhysicalAddress
{
  public PhysicalAddress();

  public string City { get; set; }
  public string Country { get; set; }
  public string CountryCode { get; set; }
}

class Parent
{
  public PhysicalAddress[] Address { get; set; }
}

class Child : Parent
{
  string division;
  string business;
}

这里Adress属性是PhysicalAddress类的数组。如何在Child实体类型中定义并添加它作为基本类型?

谢谢,

拉​​姆

1 个答案:

答案 0 :(得分:0)

使用导航属性我能够做到这一点。