Query Expression Functions (ADO.NET Data Services Framework)

In the ADO.NET Data Services Framework, the syntax described in Query Expression Syntax (ADO.NET Data Services Framework) functionName may be applied to any of the functions described in the following table.

Functions

String Functions

bool substringof(string p0, string p1)

bool endswith(string p0, string p1)

bool startswith(string p0, string p1)

int length(string p0)

int indexof(string arg)

string insert(string p0, int pos, string p1)

string remove(string p0, int pos)

string remove(string p0, int pos, int length)

string replace(string p0, string find, string replace)

string substring(string p0, int pos)

string substring(string p0, int pos, int length)

string tolower(string p0)

string toupper(string p0)

string trim(string p0)

string concat(string p0, string p1)

Date Functions

int day(DateTime p0)

int hour(DateTime p0)

int minute(DateTime p0)

int month(DateTime p0)

int second(DateTime p0)

int year(DateTime p0)

Math Functions

double round(double p0) The round functions are not supported when creating services that use LINQ to SQL.

decimal round(decimal p0)

double floor(double p0)

decimal floor(decimal p0)

double ceiling(double p0)

decimal ceiling(decimal p0)

Type Functions

Entity Data Model (EDM) equivalents are specified for the Type functions because the mapping is not one-to-one by name to EDM canonical functions.

Type Functions

bool isof(type p0)

bool isof(expression p0, type p1)

<p0> cast(type p0)

<p1> cast(expression p0, type p1)

Note that types are represented in the query syntax as strings. For example, to return customers that are of Ns.SpecialCustomer type from an entity set, use a URI such as: http://www.example.com/service.svc/Customers?$filter=isof('Ns.SpecialCustomer').

Not Supported Functions

Aggregate functions (sum, min, max, avg, etc.) are not supported because they change the meaning of the '/' operator to allow traversal through sets. Example: /Customers?$filter=average(Orders/Amount) gt 50.00 is not supported.

ISNULL and COALESCE operators are not defined. There is a null literal that can be used to compare values to null. For example, to return customers whose nullable FavoriteColor property has a value, use a URI such as: http://www.example.com/service.svc/Customers?$filter=FavoriteColor%20ne%20null.

See Also

Tags :


Community Content

Nostromo
wrong signature for function indexof

the right signature is:

int indexof(string p0, string p1)

Tags : contentbug

Page view tracker