Share via


IConventionDbFunctionBuilder.HasTranslation Method

Definition

Overloads

HasTranslation(Func<IReadOnlyCollection<SqlExpression>,SqlExpression>, Boolean)

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.

HasTranslation(Func<IReadOnlyList<SqlExpression>,SqlExpression>, Boolean)

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.

HasTranslation(Func<IReadOnlyCollection<SqlExpression>,SqlExpression>, Boolean)

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.

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

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.

Applies to

HasTranslation(Func<IReadOnlyList<SqlExpression>,SqlExpression>, Boolean)

Source:
IConventionDbFunctionBuilder.cs
Source:
IConventionDbFunctionBuilder.cs
Source:
IConventionDbFunctionBuilder.cs

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.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder? HasTranslation (Func<System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>,Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>? translation, bool fromDataAnnotation = false);
abstract member HasTranslation : Func<System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder
Public Function HasTranslation (translation As Func(Of IReadOnlyList(Of SqlExpression), SqlExpression), Optional fromDataAnnotation As Boolean = false) As IConventionDbFunctionBuilder

Parameters

translation
Func<IReadOnlyList<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.

Remarks

See Database functions for more information and examples.

Applies to