Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates a <see cref="T:System.Web.Http.SingleResult`1" /> from an <see cref="T:System.Linq.IQueryable`1" />.
Namespace: System.Web.Http
Assembly: System.Web.Http.OData (in System.Web.Http.OData.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
- queryable
Type: System.Linq.IQueryable<T>
The <see cref="T:System.Linq.IQueryable`1" /> containing zero or one entities.
Return Value
Type: System.Web.Http.SingleResult<T>
The created <see cref="T:System.Web.Http.SingleResult`1" />.
Remarks
Create is a helper method that you can call to instaniate a <see cref="T:System.Web.Http.SingleResult`1" /> object without having to explicitly specify the type <typeparamref name="T" />.