Export (0) Print
Expand All

EdmFunctionAttribute Constructor

Initializes a new instance of the EdmFunctionAttribute class.

Namespace:  System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public EdmFunctionAttribute(
	string namespaceName,
	string functionName
)

Parameters

namespaceName
Type: System.String
The namespace of the mapped-to function.
functionName
Type: System.String
The name of the mapped-to function.

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 Entity Data Model Types.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft