AssociationAttribute.OtherKey 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
대상 엔터티 클래스의 하나 이상의 멤버를 연결의 다른 쪽에 있는 키 값으로 가져오거나 설정합니다.
public:
property System::String ^ OtherKey { System::String ^ get(); void set(System::String ^ value); };
public string OtherKey { get; set; }
member this.OtherKey : string with get, set
Public Property OtherKey As String
속성 값
기본값 = 관련 클래스의 ID입니다.
예제
[Association(Name="FK_Products_Categories", Storage="_Products", OtherKey="CategoryID", DeleteRule="NO ACTION")]
public EntitySet<Product> Products
{
get
{
return this._Products;
}
set
{
this._Products.Assign(value);
}
}
<Association(Name:="FK_Products_Categories", Storage:="_Products", OtherKey:="CategoryID", DeleteRule:="NO ACTION")>
Public Property Products() As EntitySet(Of Product)
Get
Return Me._Products
End Get
Set
Me._Products.Assign(Value)
End Set
End Property
설명
여러 멤버의 경우 쉼표로 구분된 목록을 사용합니다.
키는 기본 키 또는 외래 키와 일치시킬 필요는 없지만 사용자가 지정한 카디널리티(0-1 for EntityRef<TEntity> 또는 0-n EntitySet<TEntity>)는 true로 간주됩니다.