Język

CoreOptionsExtension.WithReplacedService Metoda

Definicja

Przeciążenia

Nazwisko Opis
WithReplacedService(Type, Type)

Tworzy nowe wystąpienie z wszystkimi opcjami takimi samymi jak w przypadku tego wystąpienia, ale z daną opcją została zmieniona. Nietypowe jest bezpośrednie wywołanie tej metody. Zamiast tego użyj polecenia DbContextOptionsBuilder.

WithReplacedService(Type, Type, Type)

Tworzy nowe wystąpienie z wszystkimi opcjami takimi samymi jak w przypadku tego wystąpienia, ale z daną opcją została zmieniona. Nietypowe jest bezpośrednie wywołanie tej metody. Zamiast tego użyj polecenia DbContextOptionsBuilder.

WithReplacedService(Type, Type)

Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs

Tworzy nowe wystąpienie z wszystkimi opcjami takimi samymi jak w przypadku tego wystąpienia, ale z daną opcją została zmieniona. Nietypowe jest bezpośrednie wywołanie tej metody. Zamiast tego użyj polecenia 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

Parametry

serviceType
Type

Kontrakt usługi.

implementationType
Type

Typ implementacji do użycia dla usługi.

Zwraca

Nowe wystąpienie ze zmienioną opcją.

Dotyczy

WithReplacedService(Type, Type, Type)

Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs
Źródło:
CoreOptionsExtension.cs

Tworzy nowe wystąpienie z wszystkimi opcjami takimi samymi jak w przypadku tego wystąpienia, ale z daną opcją została zmieniona. Nietypowe jest bezpośrednie wywołanie tej metody. Zamiast tego użyj polecenia 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

Parametry

serviceType
Type

Kontrakt usługi.

newImplementationType
Type

Typ implementacji do użycia dla usługi.

currentImplementationType
Type

Określony istniejący typ implementacji do zastąpienia.

Zwraca

Nowe wystąpienie ze zmienioną opcją.

Dotyczy