The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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; }
Public Property Unique As Boolean
public bool Unique { get; set; }
Public Property Unique As Boolean

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.

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