The requested page is not available for the requested platform. You are viewing the content for Default platform.

VisibleAttribute Class

Applied to non-persistent properties. Specifies that the target property value should be visible to XPO Odata Service clients.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v18.2.Extensions.dll

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public class VisibleAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, Inherited:=True)>
Public Class VisibleAttribute
    Inherits Attribute
    Implements

Remarks

When the VisibleAttribute attribute is applied to a non-persistent (calculated) property of an XPO persistent object, the XPO OData Service executes your custom business logic associated with this property and returns the resulting value to the client.

Another way to enable this functionality is to override the XpoContext.ShowProperty method and implement the code determining which property should be visible. The XpoContext descendant is added automatically to the <ServiceName>.svc code-behind file when you create a project using the DXperience v18.2 ORM OData Service project item template.

Note

You cannot filter and sort by non-persistent property values.

Inheritance

Object
Attribute
VisibleAttribute

Implements

See Also