Share via


MetadataController Class

 

Represents an ApiController for generating OData servicedoc and metadata document ($metadata).

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

Inheritance Hierarchy

System.Object
  System.Web.Http.ApiController
    System.Web.OData.ODataController
      System.Web.OData.MetadataController

Syntax

public class MetadataController : ODataController
public ref class MetadataController : ODataController
type MetadataController = 
    class
        inherit ODataController
    end
Public Class MetadataController
    Inherits ODataController

Constructors

Name Description
System_CAPS_pubmethod MetadataController()

Properties

Name Description
System_CAPS_pubproperty ActionContext

Gets the action context.(Inherited from ApiController.)

System_CAPS_pubproperty Configuration

Gets the HttpConfiguration of the current ApiController.(Inherited from ApiController.)

System_CAPS_pubproperty ControllerContext

Gets the HttpConfiguration of the current ApiController.(Inherited from ApiController.)

System_CAPS_pubproperty ModelState

Gets the model state after the model binding process.(Inherited from ApiController.)

System_CAPS_pubproperty Request

Gets or sets the HttpRequestMessage of the current ApiController.(Inherited from ApiController.)

System_CAPS_pubproperty RequestContext

Gets the request context.(Inherited from ApiController.)

System_CAPS_pubproperty Url

Gets an instance of a UrlHelper, which is used to generate URLs to other APIs. (Inherited from ApiController.)

System_CAPS_pubproperty User

Returns the current principal associated with this request.(Inherited from ApiController.)

Methods

Name Description
System_CAPS_protmethod BadRequest()

Creates a BadRequestResult.(Inherited from ApiController.)

System_CAPS_protmethod BadRequest(ModelStateDictionary)

Creates an InvalidModelStateResult with the specified model state.(Inherited from ApiController.)

System_CAPS_protmethod BadRequest(String)

Creates an T:System.Web.Http.Results.ErrorMessageResult (400 Bad Request) with the specified error message.(Inherited from ApiController.)

System_CAPS_protmethod Conflict()

Creates a ConflictResult (409 Conflict).(Inherited from ApiController.)

System_CAPS_protmethod Content<T>(HttpStatusCode, T)

Creates a <see cref="T:System.Web.Http.NegotiatedContentResult`1" /> with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Content<T>(HttpStatusCode, T, MediaTypeFormatter)

Creates a <see cref="T:System.Web.Http.FormattedContentResult`1" /> with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Content<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue)

Creates a <see cref="T:System.Web.Http.FormattedContentResult`1" /> with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Content<T>(HttpStatusCode, T, MediaTypeFormatter, String)

Creates a <see cref="T:System.Web.Http.FormattedContentResult`1" /> with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod 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. (Inherited from ODataController.)

System_CAPS_protmethod Created<T>(String, T)

Creates a CreatedNegotiatedContentResult<T> (201 Created) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Created<T>(Uri, T)

Creates a CreatedNegotiatedContentResult<T> (201 Created) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod CreatedAtRoute<T>(String, IDictionary<String, Object>, T)

Creates a CreatedAtRouteNegotiatedContentResult<T> (201 Created) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod CreatedAtRoute<T>(String, Object, T)

Creates a CreatedAtRouteNegotiatedContentResult<T> (201 Created) with the specified values.(Inherited from ApiController.)

System_CAPS_pubmethod Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.(Inherited from ApiController.)

System_CAPS_protmethod Dispose(Boolean)

Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.(Inherited from ApiController.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod ExecuteAsync(HttpControllerContext, CancellationToken)

Executes asynchronously a single HTTP operation.(Inherited from ApiController.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetMetadata()

Generates the OData $metadata document.

System_CAPS_pubmethod GetServiceDocument()

Generates the OData service document.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod Initialize(HttpControllerContext)

Initializes the ApiController instance with the specified controllerContext.(Inherited from ApiController.)

System_CAPS_protmethod InternalServerError()

Creates an InternalServerErrorResult (500 Internal Server Error).(Inherited from ApiController.)

System_CAPS_protmethod InternalServerError(Exception)

Creates an ExceptionResult (500 Internal Server Error) with the specified exception.(Inherited from ApiController.)

System_CAPS_protmethod Json<T>(T)

Creates a JsonResult<T> (200 OK) with the specified value.(Inherited from ApiController.)

System_CAPS_protmethod Json<T>(T, JsonSerializerSettings)

Creates a JsonResult<T> (200 OK) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Json<T>(T, JsonSerializerSettings, Encoding)

Creates a JsonResult<T> (200 OK) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod NotFound()

Creates a NotFoundResult.(Inherited from ApiController.)

System_CAPS_protmethod Ok()

Creates an OkResult (200 OK).(Inherited from ApiController.)

System_CAPS_protmethod Ok<T>(T)

Creates an OkNegotiatedContentResult<T> with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Redirect(String)

Creates a redirect result (302 Found) with the specified value.(Inherited from ApiController.)

System_CAPS_protmethod Redirect(Uri)

Creates a redirect result (302 Found) with the specified value.(Inherited from ApiController.)

System_CAPS_protmethod RedirectToRoute(String, IDictionary<String, Object>)

Creates a redirect to route result (302 Found) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod RedirectToRoute(String, Object)

Creates a redirect to route result (302 Found) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod ResponseMessage(HttpResponseMessage)

Creates a ResponseMessageResult with the specified response.(Inherited from ApiController.)

System_CAPS_protmethod StatusCode(HttpStatusCode)

Creates a T:System.Web.Http.StatusCodeResult with the specified status code.(Inherited from ApiController.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_protmethod Unauthorized(AuthenticationHeaderValue[])

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod Unauthorized(IEnumerable<AuthenticationHeaderValue>)

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.(Inherited from ApiController.)

System_CAPS_protmethod 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. (Inherited from ODataController.)

System_CAPS_pubmethod Validate<TEntity>(TEntity)

Validates the given entity and adds the validation errors to the model state under the empty prefix, if any.(Inherited from ApiController.)

System_CAPS_pubmethod Validate<TEntity>(TEntity, String)

Validates the given entity and adds the validation errors to the model state, if any.(Inherited from ApiController.)

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

System.Web.OData Namespace

Return to top