ControllerBase.NotFound 方法

定义

重载

NotFound(Object)

创建生成 Status404NotFound 响应的 NotFoundObjectResult

NotFound()

创建生成 Status404NotFound 响应的 NotFoundResult

NotFound(Object)

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

创建生成 Status404NotFound 响应的 NotFoundObjectResult

public:
 virtual Microsoft::AspNetCore::Mvc::NotFoundObjectResult ^ NotFound(System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.NotFoundObjectResult NotFound (object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.NotFoundObjectResult NotFound (object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member NotFound : obj -> Microsoft.AspNetCore.Mvc.NotFoundObjectResult
override this.NotFound : obj -> Microsoft.AspNetCore.Mvc.NotFoundObjectResult
Public Overridable Function NotFound (value As Object) As NotFoundObjectResult

参数

value
Object

返回

为响应创建的 NotFoundObjectResult

属性

适用于

NotFound()

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

创建生成 Status404NotFound 响应的 NotFoundResult

public:
 virtual Microsoft::AspNetCore::Mvc::NotFoundResult ^ NotFound();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.NotFoundResult NotFound ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member NotFound : unit -> Microsoft.AspNetCore.Mvc.NotFoundResult
override this.NotFound : unit -> Microsoft.AspNetCore.Mvc.NotFoundResult
Public Overridable Function NotFound () As NotFoundResult

返回

为响应创建的 NotFoundResult

属性

适用于