Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

#Declaration

public enum ParametersMode

#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