共用方式為


ControllerBase.NotFound 方法

定義

多載

NotFound(Object)

建立產生 Status404NotFound 回應的 NotFoundObjectResult

NotFound()

建立產生 Status404NotFound 回應的 NotFoundResult

NotFound(Object)

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
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()

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
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

屬性

適用於