DbFunctionAttribute 类

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

指示给定的方法是 EDM 函数的代理。

继承层次结构

System.Object
  System.Attribute
    System.Data.Entity.DbFunctionAttribute
      System.Data.Entity.Core.Objects.DataClasses.EdmFunctionAttribute

命名空间:  System.Data.Entity
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
<SuppressMessageAttribute("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")> _
<AttributeUsageAttribute(AttributeTargets.Method, Inherited := False, AllowMultiple := False)> _
Public Class DbFunctionAttribute _
    Inherits Attribute
用法
Dim instance As DbFunctionAttribute
[SuppressMessageAttribute("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
[AttributeUsageAttribute(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public class DbFunctionAttribute : Attribute
[SuppressMessageAttribute(L"Microsoft.Performance", L"CA1813:AvoidUnsealedAttributes")]
[AttributeUsageAttribute(AttributeTargets::Method, Inherited = false, AllowMultiple = false)]
public ref class DbFunctionAttribute : public Attribute
[<SuppressMessageAttribute("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")>]
[<AttributeUsageAttribute(AttributeTargets.Method, Inherited = false, AllowMultiple = false)>]
type DbFunctionAttribute =  
    class 
        inherit Attribute 
    end
public class DbFunctionAttribute extends Attribute

DbFunctionAttribute 类型公开以下成员。

构造函数

  名称 描述
公共方法 DbFunctionAttribute 初始化 DbFunctionAttribute 类的新实例。

顶部

属性

  名称 描述
公共属性 FunctionName 映射到的函数的名称。
公共属性 NamespaceName 映射到的函数的命名空间。
公共属性 TypeId (继承自 Attribute。)

顶部

方法

  名称 描述
公共方法 Equals (继承自 Attribute。)
受保护的方法 Finalize (继承自 Object。)
公共方法 GetHashCode (继承自 Attribute。)
公共方法 GetType (继承自 Object。)
公共方法 IsDefaultAttribute (继承自 Attribute。)
公共方法 Match (继承自 Attribute。)
受保护的方法 MemberwiseClone (继承自 Object。)
公共方法 ToString (继承自 Object。)

顶部

显式接口实现  

  名称 描述
显式接口实现私有方法 _Attribute.GetIDsOfNames (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfo (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfoCount (继承自 Attribute。)
显式接口实现私有方法 _Attribute.Invoke (继承自 Attribute。)

顶部

备注

请注意在实体框架以前的某些版本中,此类被称为 EdmFunctionAttribute。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

System.Data.Entity 命名空间