DbFunctionAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将静态 CLR 方法映射到数据库函数,以便 CLR 方法可用于 LINQ 查询。 按照约定,.NET方法名称用作数据库函数的名称和默认架构。
[System.AttributeUsage(System.AttributeTargets.Method)]
[System.Runtime.CompilerServices.Nullable(0)]
public class DbFunctionAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method)]
public class DbFunctionAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DbFunctionAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type DbFunctionAttribute = class
inherit Attribute
Public Class DbFunctionAttribute
Inherits Attribute
- 继承
-
DbFunctionAttribute
- 特性
注解
有关详细信息和示例,请参阅 数据库函数 。
构造函数
| 名称 | 说明 |
|---|---|
| DbFunctionAttribute() |
初始化 DbFunctionAttribute 类的新实例。 |
| DbFunctionAttribute(String, String) |
初始化 DbFunctionAttribute 类的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| FunctionName |
数据库中函数的名称。 |
| IsBuiltIn |
指示数据库函数是否内置的值。 |
| IsNullable |
指示数据库函数是否可以返回 null 结果的值。 |
| IsNullableHasValue |
检查是否已 IsNullable 显式设置为值。 |
| Name |
数据库中函数的名称。 |
| Schema |
数据库中函数的架构。 |