Condividi tramite


CoreOptionsExtension.WithReplacedService Metodo

Definizione

Overload

WithReplacedService(Type, Type)

Crea una nuova istanza con tutte le opzioni uguali per questa istanza, ma con l'opzione specificata modificata. È insolito chiamare direttamente questo metodo. Usare invece DbContextOptionsBuilder.

WithReplacedService(Type, Type, Type)

Crea una nuova istanza con tutte le opzioni uguali per questa istanza, ma con l'opzione specificata modificata. È insolito chiamare direttamente questo metodo. Usare invece DbContextOptionsBuilder.

WithReplacedService(Type, Type)

Crea una nuova istanza con tutte le opzioni uguali per questa istanza, ma con l'opzione specificata modificata. È insolito chiamare direttamente questo metodo. Usare invece 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

Parametri

serviceType
Type

Contratto di servizio.

implementationType
Type

Tipo di implementazione da usare per il servizio.

Restituisce

Nuova istanza con l'opzione modificata.

Si applica a

WithReplacedService(Type, Type, Type)

Crea una nuova istanza con tutte le opzioni uguali per questa istanza, ma con l'opzione specificata modificata. È insolito chiamare direttamente questo metodo. Usare invece 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

Parametri

serviceType
Type

Contratto di servizio.

newImplementationType
Type

Tipo di implementazione da usare per il servizio.

currentImplementationType
Type

Tipo di implementazione esistente specifico da sostituire.

Restituisce

Nuova istanza con l'opzione modificata.

Si applica a