AssociationAttribute.OtherKey 속성

정의

대상 엔터티 클래스의 하나 이상의 멤버를 연결의 다른 쪽에 있는 키 값으로 가져오거나 설정합니다.

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로 간주됩니다.

적용 대상