ForeignKeyAttribute.Name Property

 

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.

Namespace:   System.ComponentModel.DataAnnotations.Schema
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public string Name { get; }

Property Value

Type: System.String

The name of the associated navigation property or the associated foreign key property.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.5