DataServiceQuery<TElement> DataServiceQuery<TElement> DataServiceQuery<TElement> DataServiceQuery<TElement> Class

定義

表示對資料服務的單一查詢要求。Represents a single query request to a data service.

generic <typename TElement>
public ref class DataServiceQuery : System::Data::Services::Client::DataServiceQuery, System::Collections::Generic::IEnumerable<TElement>, System::Linq::IQueryable<TElement>
public class DataServiceQuery<TElement> : System.Data.Services.Client.DataServiceQuery, System.Collections.Generic.IEnumerable<TElement>, System.Linq.IQueryable<TElement>
type DataServiceQuery<'Element> = class
    inherit DataServiceQuery
    interface IQueryable<'Element>
    interface seq<'Element>
    interface IEnumerable
    interface IQueryable
Public Class DataServiceQuery(Of TElement)
Inherits DataServiceQuery
Implements IEnumerable(Of TElement), IQueryable(Of TElement)

類型參數

TElement

查詢所傳回的結果型別。Type of results returned by the query.

繼承
實作

備註

這個類別上沒有定義任何公用建構函式 (Constructor)。No public constructors are defined on this class. 物件執行個體 (Instance) 的建立方式是在 CreateQuery 類別上使用 CreateQueryDataServiceContextObject instances are created by using CreateQuery or CreateQuery on the DataServiceContext class.

屬性

ElementType ElementType ElementType ElementType

傳回物件型別,這個物件會在範本中用來建立 DataServiceQuery<TElement> 執行個體。Returns the type of the object used in the template to create the DataServiceQuery<TElement> instance.

Expression Expression Expression Expression

表示含有資料服務查詢的運算式。Represents an expression containing the query to the data service.

Provider Provider Provider Provider

表示查詢提供者 (Provider) 執行個體。Represents the query provider instance.

RequestUri RequestUri RequestUri RequestUri

取得查詢的 URI。Get the URI for the query.

方法

AddQueryOption(String, Object) AddQueryOption(String, Object) AddQueryOption(String, Object) AddQueryOption(String, Object)

以傳回的查詢所產生之 URI 中設定的查詢選項來建立新的 DataServiceQuery<TElement>Creates a new DataServiceQuery<TElement> with the query option set in the URI generated by the returned query.

BeginExecute(AsyncCallback, Object) BeginExecute(AsyncCallback, Object) BeginExecute(AsyncCallback, Object) BeginExecute(AsyncCallback, Object)

啟動非同步網路作業,執行這個物件執行個體所表示的查詢。Starts an asynchronous network operation that executes the query represented by this object instance.

EndExecute(IAsyncResult) EndExecute(IAsyncResult) EndExecute(IAsyncResult) EndExecute(IAsyncResult)

結束對資料服務的非同步查詢要求。Ends an asynchronous query request to a data service.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Execute() Execute() Execute() Execute()

執行查詢並傳回結果做為實作 IEnumerable 的集合。Executes the query and returns the results as a collection that implements IEnumerable.

Expand(String) Expand(String) Expand(String) Expand(String)

以傳回的查詢所產生之 URI 中設定的擴展選項來建立新的 DataServiceQuery<TElement>Creates a new DataServiceQuery<TElement> with the expand option set in the URI generated by the returned query.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

執行查詢並傳回結果做為集合。Executes the query and returns the results as a collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
IncludeTotalCount() IncludeTotalCount() IncludeTotalCount() IncludeTotalCount()

要求將實體集中所有實體的計數內嵌在查詢結果中一起傳回。Requests that the count of all entities in the entity set be returned inline with the query results.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

表示對資料服務提出查詢的 URI。Represents the URI of the query to the data service.

明確介面實作

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

執行查詢並傳回結果做為集合。Executes the query and returns the results as a collection.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

傳回DataTable,其中包含副本DataRow物件,指定輸入IEnumerable<T>物件其中泛型參數TDataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

複本DataRow至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

複本DataRow至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

Cast<TResult>(IQueryable) Cast<TResult>(IQueryable) Cast<TResult>(IQueryable) Cast<TResult>(IQueryable)

IQueryable 的項目轉換為指定的型別。Converts the elements of an IQueryable to the specified type.

OfType<TResult>(IQueryable) OfType<TResult>(IQueryable) OfType<TResult>(IQueryable) OfType<TResult>(IQueryable)

篩選的項目IQueryable根據指定的型別。Filters the elements of an IQueryable based on a specified type.

SortBy<T>(IQueryable<T>, String) SortBy<T>(IQueryable<T>, String) SortBy<T>(IQueryable<T>, String) SortBy<T>(IQueryable<T>, String)

指定排序順序。Specifies a sort order.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

傳回包含來源集合中每個節點祖系的項目集合。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

傳回包含來源集合中每個節點祖系的已篩選項目集合。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

傳回包含來源集合中每個項目和文件之子代項目的項目集合。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

傳回已篩選的項目集合,其中包含來源集合中每個項目和文件的子代項目。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

傳回來源集合中每個項目和文件的子項目集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

傳回來源集合中每個項目和文件的已篩選子項目集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

傳回包含來源集合中所有節點的節點集合,依據文件順序來排序。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於