Back to Devexpress

PersistentAliasAttribute.AliasExpression Property

xpo-devexpress-dot-xpo-dot-persistentaliasattribute.md

latest2.9 KB
Original Source

PersistentAliasAttribute.AliasExpression Property

Gets the expression which determines how the property’s value is calculated.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public string AliasExpression { get; }
vb
Public ReadOnly Property AliasExpression As String

Property Value

TypeDescription
String

A String value which specifies the expression which determines how the property’s value is calculated.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the AliasExpression property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XPO_how-to-implement-odata4-service-with-xpo-netcore/CS/ODataService/Models/SingletonEdmModel.cs#L69

csharp
if(mi.IsAliased) {
    string aliasedExpr = ((PersistentAliasAttribute)mi.GetAttributeInfo(typeof(PersistentAliasAttribute))).AliasExpression;
    var aliasedCriteria = CriteriaOperator.Parse(aliasedExpr) as OperandProperty;

XPO_how-to-implement-odata4-service-with-xpo/CS/ODataService/App_Start/WebApiConfig.cs#L82

csharp
if(mi.IsAliased) {
    string aliasedExpr = ((PersistentAliasAttribute)mi.GetAttributeInfo(typeof(PersistentAliasAttribute))).AliasExpression;
    var aliasedCriteria = CriteriaOperator.Parse(aliasedExpr) as OperandProperty;

See Also

PersistentAliasAttribute Class

PersistentAliasAttribute Members

DevExpress.Xpo Namespace