QueryableAttribute.AllowedFunctions Property

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

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

Syntax

'Declaration
Public Property AllowedFunctions As AllowedFunctions 
    Get 
    Set
'Usage
Dim instance As QueryableAttribute 
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 includes 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

QueryableAttribute Class

System.Web.Http Namespace