Export (0) Print
Expand All

Canonical Functions (Entity SQL)

This section discusses canonical functions that are supported by all data providers, and can be used by all querying technologies. Canonical functions cannot be extended by a provider.

These canonical functions will be translated to the corresponding data source functionality for the provider. This allows for function invocations expressed in a common form across data sources.

Because these canonical functions are independent of data sources, argument and return types of canonical functions are defined in terms of types in the Entity Data Model (EDM). However, some data sources might not support all types in the EDM.

When canonical functions are used in an Entity SQL query, the appropriate function will be called at the data source.

All canonical functions have both null-input behavior and error conditions explicitly specified. Store providers should comply with that behavior, but Entity Framework does not enforce this behavior.

For LINQ scenarios, queries against the Entity Framework involve mapping CLR methods to methods in the underlying data source. The CLR methods map to canonical functions, so that a specific set of methods will correctly map, regardless of the data source.

Canonical Functions Namespace

The namespace for canonical function is Edm. The Edm namespace is automatically included in all queries. However, if another namespace is imported that contains a function with the same name as a canonical function (in the Edm namespace), you must specify the namespace.

In This Section

Aggregate Canonical Functions (Entity SQL)

Discusses aggregate Entity SQL canonical functions.

Math Canonical Functions (Entity SQL)

Discusses math Entity SQL canonical functions.

String Canonical Functions (Entity SQL)

Discusses string Entity SQL canonical functions.

Date and Time Canonical Functions (Entity SQL)

Discusses date and time Entity SQL canonical functions.

Bitwise Canonical Functions (Entity SQL)

Discusses bitwise Entity SQL canonical functions.

Other Canonical Functions (Entity SQL)

Discusses functions not classified as bitwise, date/time, string, math, or aggregate.

See Also

Community Additions

Show:
© 2015 Microsoft