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
Public method QueryableAttribute Initializes a new instance of the QueryableAttribute class.

Top

Properties

  Name Description
Public property AllowMultiple Gets a value that indicates whether multiple filters are allowed. (Inherited from FilterAttribute.)
Public property ResultLimit The maximum number of results that should be returned from this query regardless of query-specified limits.
Protected property StructuredQueryBuilder The IStructuredQueryBuilder to use. Derived classes can use this to have a per-attribute query builder instead of the one on HttpConfiguration
Public property TypeId (Inherited from Attribute.)

Top

Methods

  Name Description
Protected method ApplyResultLimit Applies the result limit to the query results.
Public method Equals (Inherited from Attribute.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Attribute.)
Public method GetType (Inherited from Object.)
Public method IsDefaultAttribute (Inherited from Attribute.)
Public method Match (Inherited from Attribute.)
Protected method MemberwiseClone (Inherited from Object.)
Public method OnActionExecuted Called by the Web API framework after the action method executes. (Overrides ActionFilterAttribute.OnActionExecuted(HttpActionExecutedContext).)
Public method OnActionExecuting Called by the Web API framework before the action method executes. (Overrides ActionFilterAttribute.OnActionExecuting(HttpActionContext).)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method _Attribute.GetIDsOfNames (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfo (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfoCount (Inherited from Attribute.)
Explicit interface implemetationPrivate method IActionFilter.ExecuteActionFilterAsync Executes the filter action asynchronously. (Inherited from ActionFilterAttribute.)
Explicit interface implemetationPrivate method _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.

See Also

Reference

System.Web.Http Namespace