SingleResult.Create<T> Method

Creates a SingleResult<T> from an IQueryable<T>. A helper method to instantiate a SingleResult<T> object without having to explicitly specify the type T.

Namespace:  System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Shared Function Create(Of T) ( _
    queryable As IQueryable(Of T) _
) As SingleResult(Of T)
'Usage
Dim queryable As IQueryable(Of T)
Dim returnValue As SingleResult(Of T)

returnValue = SingleResult.Create(queryable)
public static SingleResult<T> Create<T>(
    IQueryable<T> queryable
)
public:
generic<typename T>
static SingleResult<T>^ Create(
    IQueryable<T>^ queryable
)
static member Create : 
        queryable:IQueryable<'T> -> SingleResult<'T> 
JScript does not support generic types and methods.

Type Parameters

  • T
    The type of the data in the data source.

Parameters

Return Value

Type: System.Web.Http.SingleResult<T>
The created SingleResult<T>.

See Also

Reference

SingleResult Class

System.Web.Http Namespace