Skip to main content
A newer version of this page is available. .

XPMemberInfo.IsAliased Property

Gets whether a PersistentAliasAttribute attribute is applied to the property.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public bool IsAliased { get; }

Property Value

Type Description
Boolean

true if the member has the PersistentAliasAttribute attribute; otherwise, false.

Example

The following example shows how to use the PersistentAliasAttribute to implement a public read-only property exposing a value of the private persistent property. The expression passed in the PersistentAliasAttribute class constructor specifies the name of the field which stores the value at runtime. The field is decorated with the PersistentAttribute whose PersistentAttribute.MapTo property holds the name of the data store column where the field’s value is stored.

using DevExpress.Xpo;

// ...
[Persistent("DefaultAddress")]
private string mDefaultAddress;

[PersistentAlias(nameof(mDefaultAddress))]
public string DefaultAddress {
    get {
        return mDefaultAddress;
    }
}
See Also