DbFunctionAttribute 類別

定義

將靜態 CLR 方法對應至資料庫函式,以便 CLR 方法可用於 LINQ 查詢。 依照慣例,使用 .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

資料庫中函式的架構。

適用於