Table of Contents

Interface IConventionDbFunction

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

Represents a relational database function in an Microsoft.EntityFrameworkCore.Metadata.IConventionModel in the a form that can be mutated while the model is being built.

public interface IConventionDbFunction : IConventionAnnotatable, IDbFunction, IAnnotatable
Inherited Members

Properties

Builder

Gets the builder that can be used to configure this function.

IConventionDbFunctionBuilder Builder { get; }

Property Value

IConventionDbFunctionBuilder

Model

Gets the Microsoft.EntityFrameworkCore.Metadata.IConventionModel in which this function is defined.

IConventionModel Model { get; }

Property Value

IConventionModel

Parameters

Gets the parameters for this function

IReadOnlyList<IConventionDbFunctionParameter> Parameters { get; }

Property Value

IReadOnlyList<IConventionDbFunctionParameter>

Methods

GetConfigurationSource()

Gets the configuration source for this function.

ConfigurationSource GetConfigurationSource()

Returns

ConfigurationSource

The configuration source for this function.

GetIsBuiltInConfigurationSource()

Gets the configuration source for IsBuiltIn.

ConfigurationSource? GetIsBuiltInConfigurationSource()

Returns

ConfigurationSource?

The configuration source for IsBuiltIn.

GetIsNullableConfigurationSource()

Gets the configuration source for IsNullable.

ConfigurationSource? GetIsNullableConfigurationSource()

Returns

ConfigurationSource?

The configuration source for IsNullable.

GetNameConfigurationSource()

Gets the configuration source for Name.

ConfigurationSource? GetNameConfigurationSource()

Returns

ConfigurationSource?

The configuration source for Name.

GetSchemaConfigurationSource()

Gets the configuration source for Schema.

ConfigurationSource? GetSchemaConfigurationSource()

Returns

ConfigurationSource?

The configuration source for Schema.

GetStoreTypeConfigurationSource()

Gets the configuration source for StoreType.

ConfigurationSource? GetStoreTypeConfigurationSource()

Returns

ConfigurationSource?

The configuration source for StoreType.

GetTranslationConfigurationSource()

Gets the configuration source for Translation.

ConfigurationSource? GetTranslationConfigurationSource()

Returns

ConfigurationSource?

The configuration source for Translation.

GetTypeMappingConfigurationSource()

Gets the configuration source for TypeMapping.

ConfigurationSource? GetTypeMappingConfigurationSource()

Returns

ConfigurationSource?

The configuration source for TypeMapping.

SetIsBuiltIn(bool, bool)

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

bool SetIsBuiltIn(bool builtIn, bool fromDataAnnotation = false)

Parameters

builtIn bool

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

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool

The configured value.

SetIsNullable(bool, bool)

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

bool SetIsNullable(bool nullable, bool fromDataAnnotation = false)

Parameters

nullable bool

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

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool

The configured value.

SetName(string, bool)

Sets the name of the function in the database.

string SetName(string name, bool fromDataAnnotation = false)

Parameters

name string

The name of the function in the database.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

string

The configured value.

SetSchema(string, bool)

Sets the schema of the function in the database.

string SetSchema(string schema, bool fromDataAnnotation = false)

Parameters

schema string

The schema of the function in the database.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

string

The configured value.

SetStoreType(string, bool)

Sets the store type of the function in the database.

string SetStoreType(string storeType, bool fromDataAnnotation = false)

Parameters

storeType string

The store type of the function in the database.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

string

The configured value.

SetTranslation(Func<IReadOnlyCollection<SqlExpression>, SqlExpression>, bool)

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

Func<IReadOnlyCollection<SqlExpression>, SqlExpression> SetTranslation(Func<IReadOnlyCollection<SqlExpression>, SqlExpression> translation, bool fromDataAnnotation = false)

Parameters

translation Func<IReadOnlyCollection<SqlExpression>, SqlExpression>

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

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

Func<IReadOnlyCollection<SqlExpression>, SqlExpression>

The configured value.

SetTypeMapping(RelationalTypeMapping, bool)

Sets the type mapping of the function in the database.

RelationalTypeMapping SetTypeMapping(RelationalTypeMapping typeMapping, bool fromDataAnnotation = false)

Parameters

typeMapping RelationalTypeMapping

The type mapping of the function in the database.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

RelationalTypeMapping

The configured value.