Share via


DbFunctionAttribute Class

Definition

Maps a static CLR method to a database function so that the CLR method may be used in LINQ queries. By convention uses the .NET method name as name of the database function and the default schema.

[System.AttributeUsage(System.AttributeTargets.Method)]
public class DbFunctionAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type DbFunctionAttribute = class
    inherit Attribute
Public Class DbFunctionAttribute
Inherits Attribute
Inheritance
DbFunctionAttribute
Attributes

Remarks

See Database functions for more information and examples.

Constructors

DbFunctionAttribute()

Initializes a new instance of the DbFunctionAttribute class.

DbFunctionAttribute(String, String)

Initializes a new instance of the DbFunctionAttribute class.

Properties

FunctionName

The name of the function in the database.

IsBuiltIn

The value indicating whether the database function is built-in or not.

IsNullable

The value indicating whether the database function can return null result or not.

IsNullableHasValue

Checks whether IsNullable has been explicitly set to a value.

Name

The name of the function in the database.

Schema

The schema of the function in the database.

Applies to