Sprache

CoreOptionsExtension.WithApplicationServiceProvider(IServiceProvider) Methode

Definition

Erstellt eine neue Instanz mit allen Optionen, die mit dieser Instanz identisch sind, aber mit der angegebenen Option geändert wurde. Es ist ungewöhnlich, diese Methode direkt aufzurufen. Verwenden Sie stattdessen DbContextOptionsBuilder.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithApplicationServiceProvider(IServiceProvider? applicationServiceProvider);
public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithApplicationServiceProvider(IServiceProvider applicationServiceProvider);
abstract member WithApplicationServiceProvider : IServiceProvider -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
override this.WithApplicationServiceProvider : IServiceProvider -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
Public Overridable Function WithApplicationServiceProvider (applicationServiceProvider As IServiceProvider) As CoreOptionsExtension

Parameter

applicationServiceProvider
IServiceProvider

Die Option zum Ändern.

Gibt zurück

Eine neue Instanz mit geänderter Option.

Gilt für: