Share via


ODataController Class

Definition

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

[Microsoft.AspNet.OData.ODataFormatting]
[Microsoft.AspNet.OData.ODataRouting]
[System.Web.Http.Description.ApiExplorerSettings(IgnoreApi=true)]
public abstract class ODataController : System.Web.Http.ApiController
[Microsoft.AspNet.OData.ODataFormatting]
[Microsoft.AspNet.OData.ODataRouting]
[Microsoft.AspNetCore.Mvc.ApiExplorerSettings(IgnoreApi=true)]
public abstract class ODataController : Microsoft.AspNetCore.Mvc.ControllerBase
[<Microsoft.AspNet.OData.ODataFormatting>]
[<Microsoft.AspNet.OData.ODataRouting>]
[<System.Web.Http.Description.ApiExplorerSettings(IgnoreApi=true)>]
type ODataController = class
    inherit ApiController
[<Microsoft.AspNet.OData.ODataFormatting>]
[<Microsoft.AspNet.OData.ODataRouting>]
[<Microsoft.AspNetCore.Mvc.ApiExplorerSettings(IgnoreApi=true)>]
type ODataController = class
    inherit ControllerBase
Public MustInherit Class ODataController
Inherits ApiController
Public MustInherit Class ODataController
Inherits ControllerBase
Inheritance
ODataController
Inheritance
ODataController
Derived
Attributes
ODataFormattingAttribute ODataRoutingAttribute System.Web.Http.Description.ApiExplorerSettingsAttribute ApiExplorerSettingsAttribute

Remarks

These attributes and this signature uses types that are AspNet-specific.

Constructors

ODataController()

Methods

BadRequest(ODataError)
BadRequest(String)
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.

Dispose(Boolean)

Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.

NotFound(ODataError)
NotFound(String)
ODataErrorResult(ODataError)
ODataErrorResult(String, String)
Unauthorized(ODataError)
Unauthorized(String)
Updated<TEntity>(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.

Applies to