Share via


ODataController Class

Defines a base class for OData controllers that support writing and reading data using the OData formats.

Inheritance Hierarchy

System.Object
  System.Web.Http.ApiController
    System.Web.Http.OData.ODataController
      System.Web.Http.OData.AsyncEntitySetController<TEntity, TKey>
      System.Web.Http.OData.EntitySetController<TEntity, TKey>
      System.Web.Http.OData.ODataMetadataController

Namespace:  System.Web.Http.OData
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Syntax

'Declaration
<ODataRoutingAttribute> _
<ODataFormattingAttribute> _
<ApiExplorerSettingsAttribute(IgnoreApi := True)> _
Public MustInherit Class ODataController _
    Inherits ApiController
'Usage
Dim instance As ODataController
[ODataRoutingAttribute]
[ODataFormattingAttribute]
[ApiExplorerSettingsAttribute(IgnoreApi = true)]
public abstract class ODataController : ApiController
[ODataRoutingAttribute]
[ODataFormattingAttribute]
[ApiExplorerSettingsAttribute(IgnoreApi = true)]
public ref class ODataController abstract : public ApiController
[<AbstractClassAttribute>]
[<ODataRoutingAttribute>]
[<ODataFormattingAttribute>]
[<ApiExplorerSettingsAttribute(IgnoreApi = true)>]
type ODataController =  
    class 
        inherit ApiController 
    end
public abstract class ODataController extends ApiController

The ODataController type exposes the following members.

Constructors

  Name Description
Protected method ODataController Initializes a new instance of the ODataController class.

Top

Properties

  Name Description
Public property Configuration (Inherited from ApiController.)
Public property ControllerContext (Inherited from ApiController.)
Public property ModelState (Inherited from ApiController.)
Public property Request (Inherited from ApiController.)
Public property RequestContext (Inherited from ApiController.)
Public property Url (Inherited from ApiController.)
Public property User (Inherited from ApiController.)

Top

Methods

  Name Description
Protected method BadRequest() (Inherited from ApiController.)
Protected method BadRequest(String) (Inherited from ApiController.)
Protected method BadRequest(ModelStateDictionary) (Inherited from ApiController.)
Protected method Conflict (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T) (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T, MediaTypeFormatter) (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T, MediaTypeFormatter, String) (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue) (Inherited from ApiController.)
Protected method Created<TEntity>(TEntity) Creates an action result with the specified values that is a response to a POST operation with an entity to an entity set.
Protected method Created<T>(String, T) (Inherited from ApiController.)
Protected method Created<T>(Uri, T) (Inherited from ApiController.)
Protected method CreatedAtRoute<T>(String, Object, T) (Inherited from ApiController.)
Protected method CreatedAtRoute<T>(String, IDictionary<String, Object>, T) (Inherited from ApiController.)
Public method Dispose() (Inherited from ApiController.)
Protected method Dispose(Boolean) (Inherited from ApiController.)
Public method Equals (Inherited from Object.)
Public method ExecuteAsync (Inherited from ApiController.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method Initialize (Inherited from ApiController.)
Protected method InternalServerError() (Inherited from ApiController.)
Protected method InternalServerError(Exception) (Inherited from ApiController.)
Protected method Json<T>(T) (Inherited from ApiController.)
Protected method Json<T>(T, JsonSerializerSettings) (Inherited from ApiController.)
Protected method Json<T>(T, JsonSerializerSettings, Encoding) (Inherited from ApiController.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method NotFound (Inherited from ApiController.)
Protected method Ok() (Inherited from ApiController.)
Protected method Ok<T>(T) (Inherited from ApiController.)
Protected method Redirect(String) (Inherited from ApiController.)
Protected method Redirect(Uri) (Inherited from ApiController.)
Protected method RedirectToRoute(String, Object) (Inherited from ApiController.)
Protected method RedirectToRoute(String, IDictionary<String, Object>) (Inherited from ApiController.)
Protected method ResponseMessage (Inherited from ApiController.)
Protected method StatusCode (Inherited from ApiController.)
Public method ToString (Inherited from Object.)
Protected method Unauthorized(array<AuthenticationHeaderValue[]) (Inherited from ApiController.)
Protected method Unauthorized(IEnumerable<AuthenticationHeaderValue>) (Inherited from ApiController.)
Protected method Updated<TEntity> Creates an action result with the specified values that is a response to a PUT, PATCH, or a MERGE operation on an OData entity.

Top

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.OData Namespace