13 references to Ok
Microsoft.AspNetCore.Http.Results (1)
Results.cs (1)
671=> value is null ? TypedResults.Ok() : TypedResults.Ok(value);
Microsoft.AspNetCore.Http.Results.Tests (1)
TypedResultsTests.cs (1)
1040var result = TypedResults.Ok(value);
Microsoft.AspNetCore.Identity (3)
IdentityApiEndpointRouteBuilderExtensions.cs (3)
326return TypedResults.Ok(new TwoFactorResponse 345return TypedResults.Ok(await CreateInfoResponseAsync(user, userManager)); 387return TypedResults.Ok(await CreateInfoResponseAsync(user, userManager));
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiGeneratorTests.cs (1)
873var operation = GetOpenApiOperation(() => TypedResults.Ok(new InferredJsonClass()),
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
494builder.MapGet("/", () => TypedResults.Ok<PaginatedItems<Todo>>(new(0, 1, 5, 50, [new Todo(1, "Test Title", true, DateTime.Now), new Todo(2, "Test Title 2", false, DateTime.Now)])));
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
73builder.MapPost("/api", (Todo todo) => TypedResults.Ok(todo));
MinimalSample (1)
Program.cs (1)
75>= 1 and <= 10 => TypedResults.Ok(new Todo(id, "Walk the dog")),
Sample (4)
Program.cs (4)
99schemas.MapGet("/typed-results", () => TypedResults.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })); 101? TypedResults.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 }) 107schemas.MapGet("/product", (Product product) => TypedResults.Ok(product)); 108schemas.MapGet("/account", (Account account) => TypedResults.Ok(account));