語言

RelationalQueryableExtensions.CreateDbCommand(IQueryable) 方法

定義

建立 DbCommand 一個設定來執行這個查詢。

public static System.Data.Common.DbCommand CreateDbCommand(this System.Linq.IQueryable source);
static member CreateDbCommand : System.Linq.IQueryable -> System.Data.Common.DbCommand
<Extension()>
Public Function CreateDbCommand (source As IQueryable) As DbCommand

參數

source
IQueryable

查詢來源。

傳回

除錯用的查詢字串。

備註

這通常只支援由 Entity Framework Core 產生的查詢。

警告:無法保證直接執行此指令會產生與 EF Core 執行相同的行為。

請注意 DbCommand 是一個 IDisposable 物件。 呼叫者負責處理回傳指令。

這通常只支援由 Entity Framework Core 產生的查詢。

更多資訊與範例請參閱 日誌、事件與診斷 。

適用於