ODataValidationSettings Class

Definition

This class describes the validation settings for querying.

public class ODataValidationSettings
type ODataValidationSettings = class
Public Class ODataValidationSettings
Inheritance
ODataValidationSettings

Constructors

ODataValidationSettings()

Properties

AllowedArithmeticOperators

Gets or sets a list of allowed arithmetic operators including 'add', 'sub', 'mul', 'div', 'mod'.

AllowedFunctions

Gets or sets a list of allowed functions used in the $filter query.

The allowed functions include the following:

String related: contains, endswith, startswith, length, indexof, substring, tolower, toupper, trim, concat

e.g. ~/Customers?$filter=length(CompanyName) eq 19

Date and Time related: year, month, day, hour, minute, second, fractionalseconds, date, time

e.g. ~/Employees?$filter=year(BirthDate) eq 1971

Math related: round, floor, ceiling

Type related:isof, cast,

Collection related: any, all

AllowedLogicalOperators

Gets or sets a list of allowed logical operators such as 'eq', 'ne', 'gt', 'ge', 'lt', 'le', 'and', 'or', 'not'.

AllowedOrderByProperties

Gets a list of properties one can orderby the result with. Note, by default this list is empty, it means it can be ordered by any property.

For example, having an empty collection means client can order the queryable result by any properties. Adding "Name" to this list means that it only allows queryable result to be ordered by Name property.

AllowedQueryOptions

Gets or sets the query parameters that are allowed inside query. The default is all query options, including $filter, $skip, $top, $orderby, $expand, $select, $count, $format, $skiptoken and $deltatoken.

MaxAnyAllExpressionDepth

Gets or sets the maximum depth of the Any or All elements nested inside the query.

MaxExpansionDepth

Gets or sets the max expansion depth for the $expand query option.

MaxNodeCount

Gets or sets the maximum number of the nodes inside the $filter syntax tree.

MaxOrderByNodeCount

Gets or sets the maximum number of expressions that can be present in the $orderby.

MaxSkip

Gets or sets the max value of $skip that a client can request.

MaxTop

Gets or sets the max value of $top that a client can request.

Applies to