Share via


DbFunctionBuilder.HasTranslation Method

Definition

Overloads

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

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<IReadOnlyCollection<Expression>,Expression>)

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>)

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>)

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 virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder HasTranslation (Func<System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>,Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> translation);
abstract member HasTranslation : Func<System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
override this.HasTranslation : Func<System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
Public Overridable Function HasTranslation (translation As Func(Of IReadOnlyCollection(Of SqlExpression), SqlExpression)) As DbFunctionBuilder

Parameters

translation
Func<IReadOnlyCollection<SqlExpression>,SqlExpression>

The translation to use.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

HasTranslation(Func<IReadOnlyCollection<Expression>,Expression>)

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 virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder HasTranslation (Func<System.Collections.Generic.IReadOnlyCollection<System.Linq.Expressions.Expression>,System.Linq.Expressions.Expression> translation);
abstract member HasTranslation : Func<System.Collections.Generic.IReadOnlyCollection<System.Linq.Expressions.Expression>, System.Linq.Expressions.Expression> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
override this.HasTranslation : Func<System.Collections.Generic.IReadOnlyCollection<System.Linq.Expressions.Expression>, System.Linq.Expressions.Expression> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
Public Overridable Function HasTranslation (translation As Func(Of IReadOnlyCollection(Of Expression), Expression)) As DbFunctionBuilder

Parameters

translation
Func<IReadOnlyCollection<Expression>,Expression>

The translation to use.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

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

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 virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder HasTranslation (Func<System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>,Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> translation);
abstract member HasTranslation : Func<System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
override this.HasTranslation : Func<System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression>, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
Public Overridable Function HasTranslation (translation As Func(Of IReadOnlyList(Of SqlExpression), SqlExpression)) As DbFunctionBuilder

Parameters

translation
Func<IReadOnlyList<SqlExpression>,SqlExpression>

The translation to use.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

See Database functions for more information and examples.

Applies to