Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DbFunctionAttribute Class

Definition

Namespace:
Microsoft.EntityFrameworkCore
Assembly:
Microsoft.EntityFrameworkCore.Abstractions.dll
Assembly:
Microsoft.EntityFrameworkCore.Relational.dll
Package:
Microsoft.EntityFrameworkCore.Abstractions v10.0.0
Package:
Microsoft.EntityFrameworkCore.Relational v2.0.3
Package:
Microsoft.EntityFrameworkCore.Abstractions v2.1.11
Package:
Microsoft.EntityFrameworkCore.Abstractions v2.2.6
Package:
Microsoft.EntityFrameworkCore.Abstractions v3.0.0
Package:
Microsoft.EntityFrameworkCore.Abstractions v3.1.0
Package:
Microsoft.EntityFrameworkCore.Abstractions v5.0.0
Package:
Microsoft.EntityFrameworkCore.Abstractions v6.0.0
Package:
Microsoft.EntityFrameworkCore.Abstractions v7.0.0
Package:
Microsoft.EntityFrameworkCore.Abstractions v8.0.0
Package:
Microsoft.EntityFrameworkCore.Abstractions v9.0.0
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs
Source:
DbFunctionAttribute.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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)]
[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
Inheritance
DbFunctionAttribute
Attributes

Remarks

See Database functions for more information and examples.

Constructors

Name Description
DbFunctionAttribute()

Initializes a new instance of the DbFunctionAttribute class.

DbFunctionAttribute(String, String)

Initializes a new instance of the DbFunctionAttribute class.

Properties

Name Description
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


Feedback

Was this page helpful?