Definition
Assembly: Microsoft.Restier.AspNetCore.dll Namespace: Microsoft.Restier.AspNetCore Inheritance: Microsoft.AspNet.OData.ODataControllerSyntax
Summary
The all-in-one controller class to handle API requests.Constructors
.ctor
Initializes a new instance of the RestierController class.Syntax
Methods
Delete
Handles a DELETE request to delete an entity.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken | System.Threading.CancellationToken | The cancellation token. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
The task object that contains the deletion result.
Get
Handles a GET request to query entities.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken | System.Threading.CancellationToken | The cancellation token. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
The task object that contains the response message.
Patch
Handles a PATCH request to partially update an entity.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
edmEntityObject | Microsoft.AspNet.OData.EdmEntityObject | The entity object to update. |
cancellationToken | System.Threading.CancellationToken | The cancellation token. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
The task object that contains the updated result.
Post
Handles a POST request to create an entity.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
edmEntityObject | Microsoft.AspNet.OData.EdmEntityObject | The entity object to create. |
cancellationToken | System.Threading.CancellationToken | The cancellation token. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
The task object that contains the creation result.
PostAction
Handles a POST request to an action.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
parameters | Microsoft.AspNet.OData.ODataActionParameters | Parameters from action request content. |
cancellationToken | System.Threading.CancellationToken | The cancellation token. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
The task object that contains the action result.
Put
Handles a PUT request to fully update an entity.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
edmEntityObject | Microsoft.AspNet.OData.EdmEntityObject | The entity object to update. |
cancellationToken | System.Threading.CancellationToken | The cancellation token. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
The task object that contains the updated result.