ControllerBase.AcceptedAtAction Method

Definition

Overloads

AcceptedAtAction(String)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Creates an AcceptedAtActionResult object that produces a Status202Accepted response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string actionName);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string? actionName);

Parameters

actionName
String

The name of the action to use for generating the URL.

Returns

The created AcceptedAtActionResult for the response.

Attributes

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AcceptedAtAction(String, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Creates an AcceptedAtActionResult object that produces a Status202Accepted response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string actionName, object value);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string? actionName, object? value);

Parameters

actionName
String

The name of the action to use for generating the URL.

value
Object

The optional content value to format in the entity body; may be null.

Returns

The created AcceptedAtActionResult for the response.

Attributes

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AcceptedAtAction(String, String)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Creates an AcceptedAtActionResult object that produces a Status202Accepted response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string actionName, string controllerName);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string? actionName, string? controllerName);

Parameters

actionName
String

The name of the action to use for generating the URL.

controllerName
String

The name of the controller to use for generating the URL.

Returns

The created AcceptedAtActionResult for the response.

Attributes

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AcceptedAtAction(String, Object, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Creates an AcceptedAtActionResult object that produces a Status202Accepted response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string actionName, object routeValues, object value);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string? actionName, object? routeValues, object? value);

Parameters

actionName
String

The name of the action to use for generating the URL.

routeValues
Object

The route data to use for generating the URL.

value
Object

The optional content value to format in the entity body; may be null.

Returns

The created AcceptedAtActionResult for the response.

Attributes

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AcceptedAtAction(String, String, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Creates an AcceptedAtActionResult object that produces a Status202Accepted response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string actionName, string controllerName, object routeValues);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string? actionName, string? controllerName, object? routeValues);

Parameters

actionName
String

The name of the action to use for generating the URL.

controllerName
String

The name of the controller to use for generating the URL.

routeValues
Object

The route data to use for generating the URL.

Returns

The created AcceptedAtActionResult for the response.

Attributes

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AcceptedAtAction(String, String, Object, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Creates an AcceptedAtActionResult object that produces a Status202Accepted response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string actionName, string controllerName, object routeValues, object value);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction (string? actionName, string? controllerName, object? routeValues, object? value);

Parameters

actionName
String

The name of the action to use for generating the URL.

controllerName
String

The name of the controller to use for generating the URL.

routeValues
Object

The route data to use for generating the URL.

value
Object

The optional content value to format in the entity body; may be null.

Returns

The created AcceptedAtActionResult for the response.

Attributes

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0