CoreOptionsExtension.WithApplicationServiceProvider(IServiceProvider) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新實例,所有選項與此實例相同,但所給選項有所改變。 直接稱呼此方法並不常見。 請改用 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
參數
- applicationServiceProvider
- IServiceProvider
改變的選項。
傳回
一個新實例,選項被更改。