ControllerBase.NotFound 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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。
- 属性