ForeignKeyAttribute(String) 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 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
关联的导航属性的名称,或一个或多个关联的外键的名称。
注解
如果将属性 ForeignKey 添加到外键属性, name 则应指定关联的导航属性的名称。 如果将属性添加到 ForeignKey 导航属性, name 应指定一个或多个关联的外键的名称。 如果导航属性具有多个外键,请使用逗号分隔外键名称列表。 有关详细信息,请参阅 Code First 数据注释。