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 EntityRef<TEntity> 에 대 한 0-n EntitySet<TEntity>) true로 간주 됩니다.

적용 대상