Class SelectExpandQueryOption
Represents the OData $select and $expand query options.
public class SelectExpandQueryOption
- Inheritance
-
SelectExpandQueryOption
- Inherited Members
Constructors
SelectExpandQueryOption(string, string, ODataQueryContext)
Initializes a new instance of the SelectExpandQueryOption class.
public SelectExpandQueryOption(string select, string expand, ODataQueryContext context)
Parameters
select
stringThe $select query parameter value.
expand
stringThe $select query parameter value.
context
ODataQueryContextThe ODataQueryContext which contains the Microsoft.Data.Edm.IEdmModel and some type information.
Properties
Context
Gets the given ODataQueryContext.
public ODataQueryContext Context { get; }
Property Value
RawExpand
Gets the raw $expand value.
public string RawExpand { get; }
Property Value
RawSelect
Gets the raw $select value.
public string RawSelect { get; }
Property Value
SelectExpandClause
Gets the parsed SelectExpandClause for this query option.
public SelectExpandClause SelectExpandClause { get; }
Property Value
- SelectExpandClause
Validator
Gets or sets the $select and $expand query validator.
public SelectExpandQueryValidator Validator { get; set; }
Property Value
Methods
ApplyTo(IQueryable, ODataQuerySettings)
Applies the $select and $expand query options to the given IQueryable using the given ODataQuerySettings.
public IQueryable ApplyTo(IQueryable queryable, ODataQuerySettings settings)
Parameters
queryable
IQueryableThe original IQueryable.
settings
ODataQuerySettingsThe ODataQuerySettings that contains all the query application related settings.
Returns
- IQueryable
The new IQueryable after the filter query has been applied to.
ApplyTo(object, ODataQuerySettings)
Applies the $select and $expand query options to the given entity using the given ODataQuerySettings.
public object ApplyTo(object entity, ODataQuerySettings settings)
Parameters
entity
objectThe original entity.
settings
ODataQuerySettingsThe ODataQuerySettings that contains all the query application related settings.
Returns
- object
The new entity after the $select and $expand query has been applied to.
Validate(ODataValidationSettings)
Validate the $select and $expand query based on the given validationSettings
. It throws an ODataException if validation failed.
public void Validate(ODataValidationSettings validationSettings)
Parameters
validationSettings
ODataValidationSettingsThe ODataValidationSettings instance which contains all the validation settings.