ForeignKeyAttribute Constructor (String)
Initializes a new instance of the ForeignKeyAttribute class.
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
Parameters
- name
-
Type:
System.String
If you add the ForeigKey attribute to a foreign key property, you should specify the name of the associated navigation property. If you add the ForeigKey attribute to a navigation property, you should specify the name of the associated foreign key(s). If a navigation property has multiple foreign keys, use comma to separate the list of foreign key names. For more information, see Code First Data Annotations.
Universal Windows Platform
Available since 10
.NET Framework
Available since 4.5
Available since 10
.NET Framework
Available since 4.5