QueryableAttribute Class
Enables a controller action to support OData query parameters.
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 (in System.Web.Http.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 | |
---|---|---|
AllowMultiple | Gets a value that indicates whether multiple filters are allowed. (Inherited from FilterAttribute.) | |
ResultLimit | The maximum number of results that should be returned from this query regardless of query-specified limits. | |
StructuredQueryBuilder | The IStructuredQueryBuilder to use. Derived classes can use this to have a per-attribute query builder instead of the one on HttpConfiguration | |
TypeId | (Inherited from Attribute.) |
Top
Methods
Name | Description | |
---|---|---|
ApplyResultLimit | Applies the result limit to the query results. | |
Equals | (Inherited from Attribute.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Attribute.) | |
GetType | (Inherited from Object.) | |
IsDefaultAttribute | (Inherited from Attribute.) | |
Match | (Inherited from Attribute.) | |
MemberwiseClone | (Inherited from Object.) | |
OnActionExecuted | Called by the Web API framework after the action method executes. (Overrides ActionFilterAttribute.OnActionExecuted(HttpActionExecutedContext).) | |
OnActionExecuting | Called by the Web API framework before the action method executes. (Overrides ActionFilterAttribute.OnActionExecuting(HttpActionContext).) | |
ToString | (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
_Attribute.GetIDsOfNames | (Inherited from Attribute.) | |
_Attribute.GetTypeInfo | (Inherited from Attribute.) | |
_Attribute.GetTypeInfoCount | (Inherited from Attribute.) | |
IActionFilter.ExecuteActionFilterAsync | Executes the filter action asynchronously. (Inherited from ActionFilterAttribute.) | |
_Attribute.Invoke | (Inherited from Attribute.) |
Top
Remarks
If a Web API controller action returns an IQueryable, you can mark the action method with QueryableAttribute to support OData query parameters on the request URI.
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.