Compartilhar via


CoreOptionsExtension.WithReplacedService Método

Definição

Sobrecargas

WithReplacedService(Type, Type)

Cria uma nova instância com todas as opções iguais às desta instância, mas com a opção fornecida alterada. É incomum chamar esse método diretamente. Use DbContextOptionsBuilder.

WithReplacedService(Type, Type, Type)

Cria uma nova instância com todas as opções iguais às desta instância, mas com a opção fornecida alterada. É incomum chamar esse método diretamente. Use DbContextOptionsBuilder.

WithReplacedService(Type, Type)

Cria uma nova instância com todas as opções iguais às desta instância, mas com a opção fornecida alterada. É incomum chamar esse método diretamente. Use 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

Parâmetros

serviceType
Type

O contrato de serviço.

implementationType
Type

O tipo de implementação a ser usado para o serviço.

Retornos

Uma nova instância com a opção alterada.

Aplica-se a

WithReplacedService(Type, Type, Type)

Cria uma nova instância com todas as opções iguais às desta instância, mas com a opção fornecida alterada. É incomum chamar esse método diretamente. Use 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

Parâmetros

serviceType
Type

O contrato de serviço.

newImplementationType
Type

O tipo de implementação a ser usado para o serviço.

currentImplementationType
Type

O tipo de implementação existente específico a ser substituído.

Retornos

Uma nova instância com a opção alterada.

Aplica-se a