Прочетете на английски

Споделяне чрез


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.

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

Продукт Версии
Entity Framework Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0