Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ForeignKeyAttribute::Name Property

.NET Framework (current version)
 

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:
property String^ Name {
	String^ 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
Return to top
Show:
© 2017 Microsoft