TypedResults.NotFound 方法

定义

重载

NotFound()

生成 Status404NotFound 响应。

NotFound<TValue>(TValue)

生成 Status404NotFound 响应。

NotFound()

Source:
TypedResults.cs

生成 Status404NotFound 响应。

public static Microsoft.AspNetCore.Http.HttpResults.NotFound NotFound ();
static member NotFound : unit -> Microsoft.AspNetCore.Http.HttpResults.NotFound
Public Shared Function NotFound () As NotFound

返回

为响应创建的 NotFound

适用于

NotFound<TValue>(TValue)

Source:
TypedResults.cs

生成 Status404NotFound 响应。

public static Microsoft.AspNetCore.Http.HttpResults.NotFound<TValue> NotFound<TValue> (TValue? value);
static member NotFound : 'Value -> Microsoft.AspNetCore.Http.HttpResults.NotFound<'Value>
Public Shared Function NotFound(Of TValue) (value As TValue) As NotFound(Of TValue)

类型参数

TValue

将 JSON 序列化为响应正文的对象的类型。

参数

value
TValue

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 NotFound<TValue>

适用于