Share via


ODataValidationSettings Class

 

This class describes the validation settings for querying.

Namespace:   System.Web.OData.Query
Assembly:  System.Web.OData (in System.Web.OData.dll)

Inheritance Hierarchy

System.Object
  System.Web.OData.Query.ODataValidationSettings

Syntax

public class ODataValidationSettings
public ref class ODataValidationSettings 
type ODataValidationSettings = class end
Public Class ODataValidationSettings

Constructors

Name Description
System_CAPS_pubmethod ODataValidationSettings()

Properties

Name Description
System_CAPS_pubproperty AllowedArithmeticOperators

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

System_CAPS_pubproperty AllowedFunctions

Gets or sets a list of allowed functions used in the $filter query. The allowed functions include the following: String related: substringof, endswith, startswith, length, indexof, substring, tolower, toupper, trim, concat e.g. ~/Customers?$filter=length(CompanyName) eq 19 DateTime related: year, years, month, months, day, days, hour, hours, minute, minutes, second, seconds e.g. ~/Employees?$filter=year(BirthDate) eq 1971 Math related: round, floor, ceiling Type related:isof, cast, Collection related: any, all

System_CAPS_pubproperty AllowedLogicalOperators

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

System_CAPS_pubproperty 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.

System_CAPS_pubproperty 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 and $skiptoken.

System_CAPS_pubproperty MaxAnyAllExpressionDepth

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

System_CAPS_pubproperty MaxExpansionDepth

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

System_CAPS_pubproperty MaxNodeCount

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

System_CAPS_pubproperty MaxOrderByNodeCount

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

System_CAPS_pubproperty MaxSkip

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

System_CAPS_pubproperty MaxTop

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

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.OData.Query Namespace

Return to top