Share via


ODataValidationSettings.AllowedFunctions Property

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

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

Syntax

'Declaration
Public Property AllowedFunctions As AllowedFunctions 
    Get 
    Set
'Usage
Dim instance As ODataValidationSettings 
Dim value As AllowedFunctions 

value = instance.AllowedFunctions

instance.AllowedFunctions = value
public AllowedFunctions AllowedFunctions { get; set; }
public:
property AllowedFunctions AllowedFunctions {
    AllowedFunctions get ();
    void set (AllowedFunctions value);
}
member AllowedFunctions : AllowedFunctions with get, set
function get AllowedFunctions () : AllowedFunctions 
function set AllowedFunctions (value : AllowedFunctions)

Property Value

Type: System.Web.Http.OData.Query.AllowedFunctions
A list of allowed functions used in the $filter query.

Remarks

The allowed functions include the following:

  1. String related: substringof, endswith, startswith, length, indexof, substring, tolower, toupper, trim, concat

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

  2. DateTime related: year, years, month, months, day, days, hour, hours, minute, minutes, second, seconds

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

  3. Math related: round, floor, ceiling

  4. Type related:isof, cast

  5. Collection related: any, all

See Also

Reference

ODataValidationSettings Class

System.Web.Http.OData.Query Namespace