次の方法で共有


CoreOptionsExtension.WithReplacedService メソッド

定義

オーバーロード

WithReplacedService(Type, Type)

このインスタンスと同じオプションを持つすべてのオプションを持つ新しいインスタンスを作成しますが、指定されたオプションが変更されています。 このメソッドを直接呼び出すのは異常です。 代わりに DbContextOptionsBuilder を使用します。

WithReplacedService(Type, Type, Type)

このインスタンスと同じオプションを持つすべてのオプションを持つ新しいインスタンスを作成しますが、指定されたオプションが変更されています。 このメソッドを直接呼び出すのは異常です。 代わりに DbContextOptionsBuilder を使用します。

WithReplacedService(Type, Type)

このインスタンスと同じオプションを持つすべてのオプションを持つ新しいインスタンスを作成しますが、指定されたオプションが変更されています。 このメソッドを直接呼び出すのは異常です。 代わりに DbContextOptionsBuilder を使用します。

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithReplacedService (Type serviceType, Type implementationType);
abstract member WithReplacedService : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
override this.WithReplacedService : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
Public Overridable Function WithReplacedService (serviceType As Type, implementationType As Type) As CoreOptionsExtension

パラメーター

serviceType
Type

サービス コントラクト。

implementationType
Type

サービスに使用する実装型。

戻り値

オプションが変更された新しいインスタンス。

適用対象

WithReplacedService(Type, Type, Type)

このインスタンスと同じオプションを持つすべてのオプションを持つ新しいインスタンスを作成しますが、指定されたオプションが変更されています。 このメソッドを直接呼び出すのは異常です。 代わりに DbContextOptionsBuilder を使用します。

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithReplacedService (Type serviceType, Type newImplementationType, Type currentImplementationType = default);
public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithReplacedService (Type serviceType, Type newImplementationType, Type? currentImplementationType = default);
abstract member WithReplacedService : Type * Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
override this.WithReplacedService : Type * Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
Public Overridable Function WithReplacedService (serviceType As Type, newImplementationType As Type, Optional currentImplementationType As Type = Nothing) As CoreOptionsExtension

パラメーター

serviceType
Type

サービス コントラクト。

newImplementationType
Type

サービスに使用する実装型。

currentImplementationType
Type

置き換える特定の既存の実装型。

戻り値

オプションが変更された新しいインスタンス。

適用対象