EdmFunctionAttribute(String, String) Constructor

Definition

Initializes a new instance of the EdmFunctionAttribute class.

C#
public EdmFunctionAttribute(string namespaceName, string functionName);

Parameters

namespaceName
String

The namespace of the mapped-to function.

functionName
String

The name of the mapped-to function.

Remarks

An EdmFunctionAttribute links a common language runtime (CLR) method to another function. For example, the attribute can be used to map a CLR method to a function that is exposed by the storage provider, to a user-defined function in the database, or to a user-defined function in the conceptual model. Methods that have this attribute can be called from LINQ to Entities queries.

To use an EdmFunctionAttribute to map a CLR method to a function, the following must be true:

  • The return type of the CLR method must be compatible with the return type of the mapped-to function.

  • The argument types of the CLR method must be compatible with the argument types of the mapped-to function.

For information about compatible types, see Conceptual Model Types (CSDL).

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also