Share via


SingleResult.Create<T>(IQueryable<T>) Method

Definition

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.

public static Microsoft.AspNetCore.OData.Results.SingleResult<T> Create<T> (System.Linq.IQueryable<T> queryable);
static member Create : System.Linq.IQueryable<'T> -> Microsoft.AspNetCore.OData.Results.SingleResult<'T>
Public Shared Function Create(Of T) (queryable As IQueryable(Of T)) As SingleResult(Of T)

Type Parameters

T

The type of the data in the data source.

Parameters

queryable
IQueryable<T>

The IQueryable<T> containing zero or one entities.

Returns

The created SingleResult<T>.

Applies to