ICommandBatchPreparer 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個用於為所代表的 s 清單IUpdateEntry準備 s 清單ModificationCommandBatch的服務。
此類型通常由資料庫提供者使用;通常不在應用程式碼中使用。
public interface ICommandBatchPreparer
public interface ICommandBatchPreparer : Microsoft.EntityFrameworkCore.Infrastructure.IResettableService
type ICommandBatchPreparer = interface
type ICommandBatchPreparer = interface
interface IResettableService
Public Interface ICommandBatchPreparer
Public Interface ICommandBatchPreparer
Implements IResettableService
- 實作
備註
服役期間為 Scoped。 這表示每個 DbContext 實例都會使用自己的服務實例。 實作方式可能取決於其他註冊於任何生命週期的服務。 實作不需要執行緒安全。
更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。
方法
| 名稱 | Description |
|---|---|
| BatchCommands(IList<IUpdateEntry>, IUpdateAdapter) |
建立指令批次,用來插入/更新/刪除由給定 s 清單 IUpdateEntry所代表的實體。 |
| BatchCommands(IReadOnlyList<IUpdateEntry>) |
建立指令批次,用來插入/更新/刪除由給定 s 清單 IUpdateEntry所代表的實體。 |
| CreateCommandBatches(IEnumerable<IReadOnlyModificationCommand>, Boolean) |
給定一組修改指令,會回傳一個可執行的批次,並考慮最大批次大小及其他批次限制。 |
| ResetState() |
重置服務,讓它能從池中使用。 (繼承來源 IResettableService) |
| ResetStateAsync(CancellationToken) |
重置服務,讓它能從池中使用。 (繼承來源 IResettableService) |