Class SingleResult
Represents an IQueryable containing zero or one entities. Use together with an [EnableQuery] from the System.Web.Http.OData or System.Web.OData namespace.
public abstract class SingleResult
- Inheritance
-
SingleResult
- Derived
-
SingleResult<T>
- Inherited Members
Constructors
SingleResult(IQueryable)
Initializes a new instance of the SingleResult class.
protected SingleResult(IQueryable queryable)
Parameters
queryable
IQueryableThe IQueryable containing zero or one entities.
Properties
Queryable
The IQueryable containing zero or one entities.
public IQueryable Queryable { get; }
Property Value
Methods
Create<T>(IQueryable<T>)
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 SingleResult<T> Create<T>(IQueryable<T> queryable)
Parameters
queryable
IQueryable<T>The IQueryable<T> containing zero or one entities.
Returns
- SingleResult<T>
The created SingleResult<T>.
Type Parameters
T
The type of the data in the data source.