EdmScalarPropertyAttribute.EntityKeyProperty 属性
定义
获取或设置一个值,该值指示属性是否为实体键的一部分。Gets or sets the value that indicates whether the property is part of the entity key.
public:
property bool EntityKeyProperty { bool get(); void set(bool value); };
public bool EntityKeyProperty { get; set; }
member this.EntityKeyProperty : bool with get, set
Public Property EntityKeyProperty As Boolean
属性值
一个指示属性是否为实体键的一部分的值。The value that indicates whether the property is part of the entity key.
注解
由于实体键可包含多个属性,因此对于一个实体类型的多个属性,EntityKeyProperty 可设置为 true。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.
IsNullable和 EntityKeyProperty 属性不能同时为, true 因为键成员不能是 null 。The IsNullable and EntityKeyProperty properties cannot both be true because key members cannot be null.