CoreOptionsExtension.WithApplicationServiceProvider(IServiceProvider) Methode

Definition

Erstellt eine neue instance mit allen Optionen, die für diese instance identisch sind, aber die angegebene Option wurde geändert. 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 zu ändernde Option.

Gibt zurück

Ein neuer instance mit geänderter Option.

Gilt für: