Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

IndexedAttribute.Unique Property

Gets or sets whether the index created by a property or field is a unique one.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public bool Unique { get; set; }

Property Value

Type Description
Boolean

true if the index must be unique (no two persistent objects are permitted to have the same index value); otherwise, false.

Remarks


public class User : XPObject {
    [Indexed(Unique = true)]
    public int UserId;

    public string UserName;
}
See Also