title | description | ms.date | ms.assetid |
---|---|---|---|
Calling Functions in LINQ to Entities Queries |
Use these articles to see how the EntityFunctions and SqlFunctions classes provide access to canonical and database functions as part of the Entity Framework. |
03/30/2017 |
12a525a9-727c-4464-a0c7-71a0ef541792 |
The topics in this section describe how to call functions in LINQ to Entities queries.
The xref:System.Data.Objects.EntityFunctions and xref:System.Data.Objects.SqlClient.SqlFunctions classes provide access to canonical and database functions as part of the Entity Framework. For more information, see How to: Call Canonical Functions and How to: Call Database Functions.
The process for calling a custom function requires three basic steps:
-
Define a function in your conceptual model or declare a function in your storage model.
-
Add a method to your application and map it to the function in the model with an xref:System.Data.Objects.DataClasses.EdmFunctionAttribute.
-
Call the function in a LINQ to Entities query.
For more information, see the topics in this section.
How to: Call Canonical Functions
How to: Call Database Functions
How to: Call Custom Database Functions