Share via


DataServiceContext.CreateQuery<T> Method

Creates a data service query for data of a specified generic type.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

Syntax

'Declaration
Public Function CreateQuery(Of T) ( _
    entitySetName As String _
) As DataServiceQuery(Of T)
'Usage
Dim instance As DataServiceContext 
Dim entitySetName As String 
Dim returnValue As DataServiceQuery(Of T)

returnValue = instance.CreateQuery(entitySetName)
public DataServiceQuery<T> CreateQuery<T>(
    string entitySetName
)
public:
generic<typename T>
DataServiceQuery<T>^ CreateQuery(
    String^ entitySetName
)
member CreateQuery : 
        entitySetName:string -> DataServiceQuery<'T> 
JScript does not support generic types and methods.

Type Parameters

  • T
    The type returned by the query

Parameters

  • entitySetName
    Type: System.String
    A string that resolves to a URI.

Return Value

Type: System.Data.Services.Client.DataServiceQuery<T>
A new DataServiceQuery<TElement> instance that represents a data service query.

See Also

Reference

DataServiceContext Class

System.Data.Services.Client Namespace