VisibleAttribute Class
Applied to non-persistent properties. Specifies that the target property value should be visible to XPO Odata v3 Service clients.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.Extensions.dll
Declaration
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public class VisibleAttribute :
Attribute
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 v24.2 ORM OData Service project item template.
Note
You cannot filter and sort by non-persistent property values.