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

CalculatedAttribute Class

Applied to business class properties. Specifies an expression used to calculate the target property value in the Data View mode.

Namespace: DevExpress.ExpressApp.DC

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

[AttributeUsage(AttributeTargets.Property, Inherited = true)]
public class CalculatedAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Property, Inherited:=True)>
Public Class CalculatedAttribute
    Inherits Attribute

Remarks

Below is an example of using the CalculatedAttribute.

using DevExpress.ExpressApp.DC;
// ...
public class Person {    
    // ...
    public String FirstName { get; set; }
    public String LastName { get; set; }
    [Calculated("FirstName + ' ' + LastName")]
    public String FullName {
        get {
            return FirstName + " " + LastName;
        }
    }
}

Properties, used in the CalculatedAttribute.Expression should be persistent to be able to run an SQL query at the database level.

Inheritance

Object
Attribute
CalculatedAttribute

Implements

See Also