CoreOptionsExtension.WithReplacedService Yöntem

Tanım

Aşırı Yüklemeler

WithReplacedService(Type, Type)

Bu örnekle aynı tüm seçeneklere sahip yeni bir örnek oluşturur, ancak belirtilen seçenek değiştirilmiştir. Bu yöntemi doğrudan çağırma olağan dışıdır. Bunun yerine DbContextOptionsBuilder kullanın.

WithReplacedService(Type, Type, Type)

Bu örnekle aynı tüm seçeneklere sahip yeni bir örnek oluşturur, ancak belirtilen seçenek değiştirilmiştir. Bu yöntemi doğrudan çağırma olağan dışıdır. Bunun yerine DbContextOptionsBuilder kullanın.

WithReplacedService(Type, Type)

Bu örnekle aynı tüm seçeneklere sahip yeni bir örnek oluşturur, ancak belirtilen seçenek değiştirilmiştir. Bu yöntemi doğrudan çağırma olağan dışıdır. Bunun yerine DbContextOptionsBuilder kullanın.

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

Parametreler

serviceType
Type

Hizmet sözleşmesi.

implementationType
Type

Hizmet için kullanmak üzere uygulama türü.

Döndürülenler

CoreOptionsExtension

seçeneği değiştirilmiş yeni bir örnek.

Şunlara uygulanır

WithReplacedService(Type, Type, Type)

Bu örnekle aynı tüm seçeneklere sahip yeni bir örnek oluşturur, ancak belirtilen seçenek değiştirilmiştir. Bu yöntemi doğrudan çağırma olağan dışıdır. Bunun yerine DbContextOptionsBuilder kullanın.

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

Parametreler

serviceType
Type

Hizmet sözleşmesi.

newImplementationType
Type

Hizmet için kullanmak üzere uygulama türü.

currentImplementationType
Type

Değiştirilen mevcut uygulama türü.

Döndürülenler

CoreOptionsExtension

seçeneği değiştirilmiş yeni bir örnek.

Şunlara uygulanır