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

XPMemberInfo.MappingField Property

Gets the column's name in the data store which the member's value is stored in.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public string MappingField { get; }
Public ReadOnly Property MappingField As String
public string MappingField { get; }
Public ReadOnly Property MappingField As String

Property Value

Type Description
String

A String value that specifies the column's name in the data store which the member's value is stored in.

Property Value

Type Description
String

A String value that specifies the column's name in the data store which the member's value is stored in.

Remarks

Use the MappingField property to obtain the name of the column in the data store which the member's data is stored in.

By default, the MappingField property returns the member's name. Use the PersistentAttribute to specify the name of a field in the data store to map to.

Examples

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("mDefaultAddress")]
public string DefaultAddress {
    get {
        return mDefaultAddress;
    }
}
See Also