Class KeyAttribute
- Namespace
- DevExpress.Xpo
- Assembly
- DevExpress.Xpo.v24.1.dll
Indicates that a property or a field is a key.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true)]
public sealed class KeyAttribute : Attribute
- Inheritance
-
KeyAttribute
- Inherited Members
Constructors
KeyAttribute()
Initializes a new instance of the KeyAttribute class.
public KeyAttribute()
KeyAttribute(bool)
Initializes a new instance of the KeyAttribute class with the specified KeyAttribute.AutoGenerate property.
public KeyAttribute(bool autoGenerate)
Parameters
autoGenerate
booltrue to generate the key automatically; otherwise, false. This value is assigned to the KeyAttribute.AutoGenerate property.
Properties
AutoGenerate
Gets or sets whether the key is generated automatically.
public bool AutoGenerate { get; set; }
Property Value
- bool
true to generate the key automatically; otherwise, false.