ForeignKeyAttribute(String) コンストラクター

定義

ForeignKeyAttribute クラスの新しいインスタンスを初期化します。

public:
 ForeignKeyAttribute(System::String ^ name);
public ForeignKeyAttribute(string name);
new System.ComponentModel.DataAnnotations.Schema.ForeignKeyAttribute : string -> System.ComponentModel.DataAnnotations.Schema.ForeignKeyAttribute
Public Sub New (name As String)

パラメーター

name
String

関連付けられたナビゲーション プロパティの名前、または関連付けられている 1 つ以上の外部キーの名前。

注釈

外部キー プロパティに ForeignKey 属性を追加する場合は、 name 関連付けられているナビゲーション プロパティの名前を指定する必要があります。 ナビゲーション プロパティに ForeignKey 属性を追加する場合は、 name に関連付けられている 1 つ以上の外部キーの名前を指定する必要があります。 ナビゲーション プロパティに複数の外部キーがある場合は、コンマを使用して外部キー名の一覧を区切ります。 詳細については、「 コード優先データ注釈」を参照してください。

適用対象