1 instantiation of BadRequest
Microsoft.AspNetCore.Http.Results (1)
ResultsCache.cs (1)
12public static BadRequest BadRequest { get; } = new();
18 references to BadRequest
Microsoft.AspNetCore.Http.Results (5)
BadRequest.cs (1)
19/// Initializes a new instance of the <see cref="BadRequest"/> class with the values
BadRequestOfT.cs (1)
20/// Initializes a new instance of the <see cref="BadRequest"/> class with the values
ResultsCache.cs (1)
12public static BadRequest BadRequest { get; } = new();
TypedResults.cs (2)
674/// <returns>The created <see cref="HttpResults.BadRequest"/> for the response.</returns> 675public static BadRequest BadRequest() => ResultsCache.BadRequest;
Microsoft.AspNetCore.Http.Results.Tests (11)
BadRequestResultTests.cs (7)
22var badRequestResult = new BadRequest(); 32var result = new BadRequest(); 49BadRequest MyApi() { throw new NotImplementedException(); } 54PopulateMetadata<BadRequest>(((Delegate)MyApi).GetMethodInfo(), builder); 66var result = new BadRequest(); 77Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<BadRequest>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 78Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<BadRequest>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (3)
254var result = Results.BadRequest() as BadRequest; 1736(() => Results.BadRequest(null), typeof(BadRequest)),
TypedResultsTests.cs (1)
232var result = TypedResults.BadRequest();
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
280var apiDescription = GetApiDescription(Results<Created<InferredJsonClass>, BadRequest> () =>
MinimalSample (1)
Program.cs (1)
72app.MapGet("/todo/{id}", Results<Ok<Todo>, NotFound, BadRequest> (int id) => id switch