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.v18.1.dll
Declaration
[AttributeUsage(AttributeTargets.Property, Inherited = true)]
public class CalculatedAttribute :
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.
See Also