語言

DbFunctionBuilder.IConventionDbFunctionBuilder.HasTranslation 方法

定義

設定一個回調,將被呼叫以執行此函式的自訂轉譯。 回調會取一組對應於傳遞給函式呼叫參數的表達式。 回調應回傳一個代表所需翻譯的表達式。

如需相關資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=852477 。

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

參數

translation
Func<IReadOnlyCollection<SqlExpression>,SqlExpression>

翻譯說明。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

實作

適用於