共用方式為


RelationalDbContextOptionsBuilder<TBuilder,TExtension>.WithOption 方法

定義

複製用來儲存設定的擴充功能來設定選項。 這可確保產生器不會修改已在其他位置使用中的選項。

protected virtual TBuilder WithOption (Func<TExtension,TExtension> setAction);
abstract member WithOption : Func<'Extension, 'Extension (requires 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension and 'Extension : (new : unit -> 'Extension) and 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension and 'Extension : (new : unit -> 'Extension))> -> 'Builder
override this.WithOption : Func<'Extension, 'Extension (requires 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension and 'Extension : (new : unit -> 'Extension) and 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension and 'Extension : (new : unit -> 'Extension))> -> 'Builder
Protected Overridable Function WithOption (setAction As Func(Of TExtension, TExtension)) As TBuilder

參數

setAction
Func<TExtension,TExtension>

設定選項的動作。

傳回

TBuilder

相同的產生器實例,以便鏈結多個呼叫。

適用於