ParametersMode Enum
Contains values specifying how criteria string parameters used in RuleRangeAttribute and RuleValueComparisonAttribute constructors are treated.
Namespace: DevExpress.Persistent.Validation
Assembly: DevExpress.Persistent.Base.v24.2.dll
NuGet Package: DevExpress.Persistent.Base
Declaration
Members
Name | Description |
---|---|
Value
|
A criteria string is treated as a string. |
Expression
|
A criteria string is treated as an expression. So, you can use the Criteria Language Syntax. |
Remarks
The following example demonstrates how to pass this enumeration value to the RuleRange attribute:
using System;
using DevExpress.Persistent.Validation;
//...
[RuleRange("LastSevenDays_RuleRange", "Save", "AddDays(LocalDateTimeToday(), -7)",
"LocalDateTimeToday()", ParametersMode.Expression)]
public virtual DateTime LastSevenDays { get; set; }
// Make sure that you use options.UseChangeTrackingProxies() in your DbContext settings.
See Also