Compartir a través de


CoreOptionsExtension.WithReplacedService Método

Definición

Sobrecargas

WithReplacedService(Type, Type)

Crea una nueva instancia con todas las opciones iguales que para esta instancia, pero con la opción especificada cambiada. No es habitual llamar directamente a este método. En su lugar, use DbContextOptionsBuilder.

WithReplacedService(Type, Type, Type)

Crea una nueva instancia con todas las opciones iguales que para esta instancia, pero con la opción especificada cambiada. No es habitual llamar directamente a este método. En su lugar, use DbContextOptionsBuilder.

WithReplacedService(Type, Type)

Crea una nueva instancia con todas las opciones iguales que para esta instancia, pero con la opción especificada cambiada. No es habitual llamar directamente a este método. En su lugar, 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

Contrato de servicio.

implementationType
Type

Tipo de implementación que se va a usar para el servicio.

Devoluciones

Nueva instancia con la opción modificada.

Se aplica a

WithReplacedService(Type, Type, Type)

Crea una nueva instancia con todas las opciones iguales que para esta instancia, pero con la opción especificada cambiada. No es habitual llamar directamente a este método. En su lugar, 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

Contrato de servicio.

newImplementationType
Type

Tipo de implementación que se va a usar para el servicio.

currentImplementationType
Type

Tipo de implementación existente específico que se va a reemplazar.

Devoluciones

Nueva instancia con la opción modificada.

Se aplica a