EdmScalarPropertyAttribute::EntityKeyProperty Property

 

Gets or sets the value that indicates whether the property is part of the entity key.

Namespace:   System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public:
property bool EntityKeyProperty {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

The value that indicates whether the property is part of the entity key.

Because an entity key can contain more than one property, the EntityKeyProperty can be set to true for more than one property of an entity type.

The IsNullable and EntityKeyProperty properties cannot both be true because key members cannot be null.

.NET Framework
Available since 3.5
Return to top
Show: