QueryableAttribute Class
This class defines an attribute that can be applied to an action to enable querying using the OData query syntax. To avoid processing unexpected or malicious queries, use the validation settings on QueryableAttribute to validate incoming queries. For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712.
Inheritance Hierarchy
System.Object
System.Attribute
System.Web.Http.Filters.FilterAttribute
System.Web.Http.Filters.ActionFilterAttribute
System.Web.Http.QueryableAttribute
Namespace: System.Web.Http
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Method, Inherited := True, _
AllowMultiple := False)> _
Public Class QueryableAttribute _
Inherits ActionFilterAttribute
'Usage
Dim instance As QueryableAttribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Method, Inherited = true,
AllowMultiple = false)]
public class QueryableAttribute : ActionFilterAttribute
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Method, Inherited = true,
AllowMultiple = false)]
public ref class QueryableAttribute : public ActionFilterAttribute
[<AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Method, Inherited = true,
AllowMultiple = false)>]
type QueryableAttribute =
class
inherit ActionFilterAttribute
end
public class QueryableAttribute extends ActionFilterAttribute
The QueryableAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
QueryableAttribute | Initializes a new instance of the QueryableAttribute class. |
Top
Properties
Name | Description | |
---|---|---|
AllowedArithmeticOperators | Gets or sets a value that represents a list of allowed arithmetic operators including 'add', 'sub', 'mul', 'div', 'mod'. | |
AllowedFunctions | Gets or sets a value that represents a list of allowed functions used in the $filter query. | |
AllowedLogicalOperators | Gets or sets a value that represents a list of allowed logical Operators such as 'eq', 'ne', 'gt', 'ge', 'lt', 'le', 'and', 'or', 'not'. | |
AllowedOrderByProperties | Gets or sets a string with comma-separated list of property names. The queryable result can only be ordered by those properties defined in this list. | |
AllowedQueryOptions | Gets or sets the query parameters that are allowed in queries. | |
AllowMultiple | (Inherited from FilterAttribute.) | |
EnableConstantParameterization | Gets or sets a value indicating whether constants should be parameterized. Parameterizing constants would result in better performance with Entity framework. | |
EnsureStableOrdering | Gets or sets a value indicating whether query composition should alter the original query when necessary to ensure a stable sort order. | |
HandleNullPropagation | Gets or sets a value indicating how null propagation should be handled during query composition. | |
MaxAnyAllExpressionDepth | Gets or sets the maximum depth of the Any or All elements nested inside the query. | |
MaxExpansionDepth | Gets or sets the max expansion depth for the $expand query option. | |
MaxNodeCount | Gets or sets the maximum number of nodes inside the $filter syntax tree. | |
MaxOrderByNodeCount | Gets or sets the maximum number of expressions that can be present in the $orderby. | |
MaxSkip | Gets or sets the max value of $skip that a client can request. | |
MaxTop | Gets or sets the max value of $top that a client can request. | |
PageSize | Gets or sets the maximum number of query results to send back to clients. | |
TypeId | (Inherited from Attribute.) |
Top
Methods
Name | Description | |
---|---|---|
ApplyQuery(IQueryable, ODataQueryOptions) | Applies the query to the given entity based on incoming query from uri and query settings. | |
ApplyQuery(Object, ODataQueryOptions) | Applies the query to the given entity based on incoming query from uri and query settings. | |
Equals | (Inherited from Attribute.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Attribute.) | |
GetModel | Gets the EDM model for the given type and request. | |
GetType | (Inherited from Object.) | |
IsDefaultAttribute | (Inherited from Attribute.) | |
Match | (Inherited from Attribute.) | |
MemberwiseClone | (Inherited from Object.) | |
OnActionExecuted | Performs the query composition after action is executed. (Overrides ActionFilterAttribute.OnActionExecuted(HttpActionExecutedContext).) | |
OnActionExecutedAsync | (Inherited from ActionFilterAttribute.) | |
OnActionExecuting | (Inherited from ActionFilterAttribute.) | |
OnActionExecutingAsync | (Inherited from ActionFilterAttribute.) | |
ToString | (Inherited from Object.) | |
ValidateQuery | Validates the OData query in the incoming request. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IActionFilter.ExecuteActionFilterAsync | (Inherited from ActionFilterAttribute.) | |
_Attribute.GetIDsOfNames | (Inherited from Attribute.) | |
_Attribute.GetTypeInfo | (Inherited from Attribute.) | |
_Attribute.GetTypeInfoCount | (Inherited from Attribute.) | |
_Attribute.Invoke | (Inherited from Attribute.) |
Top
Remarks
No content here will be updated; please do not add material here.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.