ControllerBase.Conflict Method

Definition

Overloads

Conflict(Object)

Creates a ConflictObjectResult that produces a Status409Conflict response.

Conflict(ModelStateDictionary)

Creates a ConflictObjectResult that produces a Status409Conflict response.

Conflict()

Creates a ConflictResult that produces a Status409Conflict response.

Conflict(Object)

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

Creates a ConflictObjectResult that produces a Status409Conflict response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ConflictObjectResult Conflict (object error);
C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ConflictObjectResult Conflict (object? error);

Parameters

error
Object

Contains errors to be returned to the client.

Returns

The created ConflictObjectResult for the response.

Attributes

Applies to

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

Conflict(ModelStateDictionary)

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

Creates a ConflictObjectResult that produces a Status409Conflict response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ConflictObjectResult Conflict (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);

Parameters

modelState
ModelStateDictionary

The ModelStateDictionary containing errors to be returned to the client.

Returns

The created ConflictObjectResult for the response.

Attributes

Applies to

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

Conflict()

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

Creates a ConflictResult that produces a Status409Conflict response.

C#
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ConflictResult Conflict ();

Returns

The created ConflictResult for the response.

Attributes

Applies to

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