ObjectQuery<T> 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| ObjectQuery<T>(String, ObjectContext) |
使用指定的 Entity SQL 命令作為初始查詢,建立新的 ObjectQuery<T> 實例。 |
| ObjectQuery<T>(String, ObjectContext, MergeOption) |
使用指定的 Entity SQL 命令作為初始查詢和指定的合併選項,建立新的 ObjectQuery<T> 實例。 |
ObjectQuery<T>(String, ObjectContext)
使用指定的 Entity SQL 命令作為初始查詢,建立新的 ObjectQuery<T> 實例。
public ObjectQuery (string commandText, System.Data.Entity.Core.Objects.ObjectContext context);
new System.Data.Entity.Core.Objects.ObjectQuery<'T> : string * System.Data.Entity.Core.Objects.ObjectContext -> System.Data.Entity.Core.Objects.ObjectQuery<'T>
Public Sub New (commandText As String, context As ObjectContext)
參數
- commandText
- String
Entity SQL 查詢。
- context
- ObjectContext
要在上面執行查詢的 ObjectContext。
適用於
ObjectQuery<T>(String, ObjectContext, MergeOption)
使用指定的 Entity SQL 命令作為初始查詢和指定的合併選項,建立新的 ObjectQuery<T> 實例。
public ObjectQuery (string commandText, System.Data.Entity.Core.Objects.ObjectContext context, System.Data.Entity.Core.Objects.MergeOption mergeOption);
new System.Data.Entity.Core.Objects.ObjectQuery<'T> : string * System.Data.Entity.Core.Objects.ObjectContext * System.Data.Entity.Core.Objects.MergeOption -> System.Data.Entity.Core.Objects.ObjectQuery<'T>
參數
- commandText
- String
Entity SQL 查詢。
- context
- ObjectContext
要在上面執行查詢的 ObjectContext。
- mergeOption
- MergeOption
指定如何透過此查詢擷取的實體與從先前查詢 ObjectContext 傳回的相同 實體合併。