Table of Contents

Interface IReadOnlyDbFunction

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Represents a relational database function in a model.

public interface IReadOnlyDbFunction : IReadOnlyAnnotatable

Remarks

See Database functions for more information and examples.

Properties

IsAggregate

Gets the value indicating whether this function is an aggregate function.

bool IsAggregate { get; }

Property Value

bool

IsBuiltIn

Gets the value indicating whether the database function is built-in.

bool IsBuiltIn { get; }

Property Value

bool

IsNullable

Gets the value indicating whether the database function can return null.

bool IsNullable { get; }

Property Value

bool

IsScalar

Gets the value indicating whether this function returns scalar value.

bool IsScalar { get; }

Property Value

bool

MethodInfo

Gets the CLR method which maps to the function in the database.

MethodInfo? MethodInfo { get; }

Property Value

MethodInfo

Model

Gets the model in which this function is defined.

IReadOnlyModel Model { get; }

Property Value

IReadOnlyModel

ModelName

Gets the name of the function in the model.

string ModelName { get; }

Property Value

string

Name

Gets the name of the function in the database.

string Name { get; }

Property Value

string

Parameters

Gets the parameters for this function.

IReadOnlyList<IReadOnlyDbFunctionParameter> Parameters { get; }

Property Value

IReadOnlyList<IReadOnlyDbFunctionParameter>

ReturnType

Gets the returned CLR type.

Type ReturnType { get; }

Property Value

Type

Schema

Gets the schema of the function in the database.

string? Schema { get; }

Property Value

string

StoreType

Gets the configured store type string.

string? StoreType { get; }

Property Value

string

Translation

Gets the translation callback for performing custom translation of the method call into a SQL expression fragment.

Func<IReadOnlyList<SqlExpression>, SqlExpression>? Translation { get; }

Property Value

Func<IReadOnlyList<SqlExpression>, SqlExpression>

TypeMapping

Gets the type mapping for the function's return type.

RelationalTypeMapping? TypeMapping { get; }

Property Value

RelationalTypeMapping

Methods

ToDebugString(MetadataDebugStringOptions, int)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

string ToDebugString(MetadataDebugStringOptions options = 0, int indent = 0)

Parameters

options MetadataDebugStringOptions

Options for generating the string.

indent int

The number of indent spaces to use before each new line.

Returns

string

A human-readable representation.