DbFunctionBuilder.IConventionDbFunctionBuilder.HasTranslation Method

Definition

Sets a callback that will be invoked to perform custom translation of this function. The callback takes a collection of expressions corresponding to the parameters passed to the function call. The callback should return an expression representing the desired translation.

See https://go.microsoft.com/fwlink/?linkid=852477 for more information.

Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder IConventionDbFunctionBuilder.HasTranslation (Func<System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>,Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> translation, bool fromDataAnnotation);
abstract member Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder.HasTranslation : Func<System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder
override this.Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder.HasTranslation : Func<System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder
Function HasTranslation (translation As Func(Of IReadOnlyCollection(Of SqlExpression), SqlExpression), fromDataAnnotation As Boolean) As IConventionDbFunctionBuilder Implements IConventionDbFunctionBuilder.HasTranslation

Parameters

translation
Func<IReadOnlyCollection<SqlExpression>,SqlExpression>

The translation to use.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Implements

Applies to