語言

ICompiledQueryCacheKeyGenerator 介面

定義

建立能唯一識別查詢的鍵。 此工具用於在快取中儲存及查詢已編譯的查詢版本。

此類型通常由資料庫提供者(及其他擴充功能)使用。 它通常不被用於應用程式程式碼中。

public interface ICompiledQueryCacheKeyGenerator
type ICompiledQueryCacheKeyGenerator = interface
Public Interface ICompiledQueryCacheKeyGenerator
衍生

備註

服役期間為 Scoped。 這表示每個 DbContext 實例都會使用自己的服務實例。 實作方式可能取決於其他註冊於任何生命週期的服務。 實作不需要執行緒安全。

更多資訊與範例請參閱「 資料庫提供者與擴充的實作 」以及「 EF Core 查詢如何運作 」。

方法

名稱 Description
GenerateCacheKey(Expression, Boolean)

產生快取金鑰。

適用於