ModelSourceDependencies.With 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| With(IModelCacheKeyFactory) |
將此相依參數物件複製,並替換一個服務。 |
| With(IModelCustomizer) |
將此相依參數物件複製,並替換一個服務。 |
| With(ICoreConventionSetBuilder) |
將此相依參數物件複製,並替換一個服務。 |
| With(IMemoryCache) |
將此相依參數物件複製,並替換一個服務。 |
With(IModelCacheKeyFactory)
將此相依參數物件複製,並替換一個服務。
public Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies With(Microsoft.EntityFrameworkCore.Infrastructure.IModelCacheKeyFactory modelCacheKeyFactory);
member this.With : Microsoft.EntityFrameworkCore.Infrastructure.IModelCacheKeyFactory -> Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies
Public Function With (modelCacheKeyFactory As IModelCacheKeyFactory) As ModelSourceDependencies
參數
- modelCacheKeyFactory
- IModelCacheKeyFactory
取代目前此類依賴的方案。
傳回
一個新的參數物件,取代了該服務。
適用於
With(IModelCustomizer)
將此相依參數物件複製,並替換一個服務。
public Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies With(Microsoft.EntityFrameworkCore.Infrastructure.IModelCustomizer modelCustomizer);
member this.With : Microsoft.EntityFrameworkCore.Infrastructure.IModelCustomizer -> Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies
Public Function With (modelCustomizer As IModelCustomizer) As ModelSourceDependencies
參數
- modelCustomizer
- IModelCustomizer
取代目前此類依賴的方案。
傳回
一個新的參數物件,取代了該服務。
適用於
With(ICoreConventionSetBuilder)
將此相依參數物件複製,並替換一個服務。
public Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies With(Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ICoreConventionSetBuilder coreConventionSetBuilder);
member this.With : Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ICoreConventionSetBuilder -> Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies
Public Function With (coreConventionSetBuilder As ICoreConventionSetBuilder) As ModelSourceDependencies
參數
- coreConventionSetBuilder
- Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ICoreConventionSetBuilder
取代目前此類依賴的方案。
傳回
一個新的參數物件,取代了該服務。
適用於
With(IMemoryCache)
將此相依參數物件複製,並替換一個服務。
public Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies With(Microsoft.Extensions.Caching.Memory.IMemoryCache memoryCache);
member this.With : Microsoft.Extensions.Caching.Memory.IMemoryCache -> Microsoft.EntityFrameworkCore.Infrastructure.ModelSourceDependencies
Public Function With (memoryCache As IMemoryCache) As ModelSourceDependencies
參數
- memoryCache
- IMemoryCache
取代目前此類依賴的方案。
傳回
一個新的參數物件,取代了該服務。