Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
.NET Framework Class Library
EdmFunctionAttribute Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

An attribute that, when applied to a method, indicates that the method is a proxy for a function in the conceptual model or storage model.

Namespace:  System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Method, Inherited := False, AllowMultiple := False)> _
Public NotInheritable Class EdmFunctionAttribute _
    Inherits Attribute
Visual Basic (Usage)
Dim instance As EdmFunctionAttribute
C#
[AttributeUsageAttribute(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class EdmFunctionAttribute : Attribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Method, Inherited = false, AllowMultiple = false)]
public ref class EdmFunctionAttribute sealed : public Attribute
F#
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Method, Inherited = false, AllowMultiple = false)>]
type EdmFunctionAttribute =  
    class
        inherit Attribute
    end

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.

System..::.Object
  System..::.Attribute
    System.Data.Objects.DataClasses..::.EdmFunctionAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker