Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

NotFound<TValue> Class

Definition

Namespace:
Microsoft.AspNetCore.Http.HttpResults
Assembly:
Microsoft.AspNetCore.Http.Results.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Source:
NotFoundOfT.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

An IResult that on execution will write an object to the response with Not Found (404) status code.

public sealed class NotFound<TValue> : Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<TValue>, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider
type NotFound<'Value> = class
 interface IResult
 interface IEndpointMetadataProvider
 interface IStatusCodeHttpResult
 interface IValueHttpResult
 interface IValueHttpResult<'Value>
Public NotInheritable Class NotFound(Of TValue)
Implements IEndpointMetadataProvider, IResult, IStatusCodeHttpResult, IValueHttpResult, IValueHttpResult(Of TValue)

Type Parameters

TValue

The type of object that will be JSON serialized to the response body.

Inheritance
NotFound<TValue>
Implements

Properties

Name Description
StatusCode

Gets the HTTP status code: Status404NotFound

Value

Gets the object result.

Methods

Name Description
ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Explicit Interface Implementations

Name Description
IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

Populates metadata for the related Endpoint and MethodInfo.

IStatusCodeHttpResult.StatusCode
IValueHttpResult.Value

Applies to


Feedback

Was this page helpful?