Share via


DbFunctionAttribute 类

定义

将静态 CLR 方法映射到数据库函数,以便可以在 LINQ 查询中使用 CLR 方法。 按照约定,使用 .NET 方法名称作为数据库函数和默认架构的名称。

[System.AttributeUsage(System.AttributeTargets.Method)]
public class DbFunctionAttribute : 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

数据库中函数的架构。

适用于