358 references to MapGet
Aspire.Dashboard (1)
DashboardEndpointsBuilder.cs (1)
42endpoints.MapGet("/api/set-language", async (string? language, string? redirectUrl, [FromHeader(Name = "Accept-Language")] string? acceptLanguage, HttpContext httpContext) =>
Aspire.Dashboard.Tests (3)
Integration\DashboardClientAuthTests.cs (1)
86serverApp.MapGet("/", () => "Communication with gRPC endpoints must be made through a gRPC client.");
Integration\MockOpenIdAuthority.cs (2)
44endpoints.MapGet( 57endpoints.MapGet(
AzureContainerApps.ApiService (6)
Program.cs (6)
21app.MapGet("/", () => 39app.MapGet("/blobs", async (BlobServiceClient bsc) => 59app.MapGet("/cosmos", async (TestCosmosContext context) => 69app.MapGet("/redis/ping", async (IConnectionMultiplexer connection) => 74app.MapGet("/redis/set", async (IConnectionMultiplexer connection) => 79app.MapGet("/redis/get", async (IConnectionMultiplexer connection) =>
AzureFunctionsEndToEnd.ApiService (4)
Program.cs (4)
24app.MapGet("/publish/asq", async (QueueServiceClient client, CancellationToken cancellationToken) => 39app.MapGet("/publish/blob", async (BlobServiceClient client, CancellationToken cancellationToken, int length = 20) => 52app.MapGet("/publish/eventhubs", async (EventHubProducerClient client, CancellationToken cancellationToken, int length = 20) => 69app.MapGet("/", async (HttpClient client) =>
AzureSearch.ApiService (1)
Program.cs (1)
23app.MapGet("/", async (SearchIndexClient searchIndexClient, CancellationToken cancellationToken) =>
AzureStorageEndToEnd.ApiService (1)
Program.cs (1)
17app.MapGet("/", async (BlobServiceClient bsc, QueueServiceClient qsc) =>
BicepSample.ApiService (8)
Program.cs (8)
28app.MapGet("/", async (MyDbContext context) => 47app.MapGet("/pg", async (MyPgDbContext context) => 66app.MapGet("/cosmos", async (CosmosClient cosmosClient) => 97app.MapGet("/redis", async (IConnectionMultiplexer connection) => 117app.MapGet("/blobs", async (BlobServiceClient blobServiceClient) => 141app.MapGet("/tables", async (TableServiceClient tableServiceClient) => 166app.MapGet("/queues", async (QueueServiceClient queueServiceClient, CancellationToken cancellationToken) => 188app.MapGet("/servicebus", async (ServiceBusClient serviceBusClient, CancellationToken cancellationToken) =>
CatalogService (2)
CatalogApi.cs (2)
13group.MapGet("items/type/all/brand/{catalogBrandId?}", async (int? catalogBrandId, CatalogDbContext catalogContext, int? before, int? after, int pageSize = 8) => 31group.MapGet("items/{catalogItemId:int}/image", async (int catalogItemId, CatalogDbContext catalogDbContext, IHostEnvironment environment) =>
CdkSample.ApiService (1)
Program.cs (1)
36app.MapGet("/", async (BlobServiceClient bsc, SqlContext sqlContext, SecretClient sc, IConnectionMultiplexer connection, CosmosContext cosmosContext, NpgsqlContext npgsqlContext, ServiceBusClient sbc, ConfigurationClient cc, SearchIndexClient search) =>
CosmosEndToEnd.ApiService (2)
Program.cs (2)
20app.MapGet("/", async (CosmosClient cosmosClient) => 51app.MapGet("/ef", async (TestCosmosContext context) =>
DaprServiceA (1)
Program.cs (1)
20app.MapGet("/weatherforecast", async (DaprClient client) =>
DaprServiceB (1)
Program.cs (1)
22app.MapGet("/weatherforecast", async (DaprClient client) =>
DatabaseMigration.ApiService (1)
Program.cs (1)
20app.MapGet("/", async (MyDb1Context context) =>
DefaultBuilder.SampleApp (1)
Program.cs (1)
15app.MapGet("/", (Func<string>)(() => "Hello, World!"));
Elasticsearch.ApiService (2)
Program.cs (2)
16app.MapGet("/get", async (ElasticsearchClient elasticClient) => 22app.MapGet("/create", async (ElasticsearchClient elasticClient) =>
EventHubsApi (1)
Program.cs (1)
15app.MapGet("/test", async (EventHubProducerClient producerClient) =>
GetDocumentSample (2)
Program.cs (2)
19app.MapGet("/hello/{name}", (string name) => $"Hello {name}!"); 20app.MapGet("/bye/{name}", (string name) => $"Bye {name}!")
IdentitySample.ApiEndpoints (2)
Program.cs (2)
24app.MapGet("/", () => "Hello, World!"); 25app.MapGet("/requires-auth", (ClaimsPrincipal user) => $"Hello, {user.Identity?.Name}!").RequireAuthorization();
Keycloak.ApiService (1)
Program.cs (1)
28app.MapGet("/weatherforecast", () =>
Keycloak.Web (1)
LoginLogoutEndpointRouteBuilderExtensions.cs (1)
13group.MapGet("/login", () => TypedResults.Challenge(new AuthenticationProperties { RedirectUri = "/" }))
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
UserJwtsTests.cs (1)
92webApp.MapGet("/secret", (ClaimsPrincipal user) => $"Hello {user.Identity?.Name}!")
Microsoft.AspNetCore.Diagnostics.Tests (5)
DeveloperExceptionPageMiddlewareTest.cs (2)
104endpoint.MapGet("/test/{id}", (int id) => 163endpoint.MapGet("/test/{id}", (int id) =>
StatusCodeMiddlewareTest.cs (3)
266endpoints.MapGet("/errorPage", () => "errorPage"); 338endpoints.MapGet("/status", (HttpResponse response) => $"Status: {response.StatusCode}"); 376endpoints.MapGet("/status", (HttpResponse response) => $"Status: {response.StatusCode}");
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HttpResponseJsonExtensionsTests.cs (2)
496app.MapGet("/", IAsyncEnumerable<int> (HttpContext httpContext) => 529app.MapGet("/", IEnumerable<int> (HttpContext httpContext) =>
Microsoft.AspNetCore.HttpLogging.Tests (9)
HttpLoggingMiddlewareTests.cs (9)
1925endpoint.MapGet("/", async (HttpContext c) => 2031endpoint.MapGet("/attr_responseonly", [HttpLogging(HttpLoggingFields.Response)] async (HttpContext c) => 2037endpoint.MapGet("/ext_responseonly", async (HttpContext c) => 2043endpoint.MapGet("/attr_responseandrequest", [HttpLogging(HttpLoggingFields.All)] async (HttpContext c) => 2050endpoint.MapGet("/ext_responseandrequest", async(HttpContext c) => 2056endpoint.MapGet("/attr_restrictedheaders", [HttpLogging((HttpLoggingFields.Request & ~HttpLoggingFields.RequestScheme) | (HttpLoggingFields.Response & ~HttpLoggingFields.ResponseStatusCode))] async (HttpContext c) => 2062endpoint.MapGet("/ext_restrictedheaders", async (HttpContext c) => 2068endpoint.MapGet("/attr_restrictedsize", [HttpLogging(HttpLoggingFields.RequestBody | HttpLoggingFields.ResponseBody, RequestBodyLogLimit = 3, ResponseBodyLogLimit = 6)] async (HttpContext c) => 2074endpoint.MapGet("/ext_restrictedsize", async (HttpContext c) =>
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (2)
142routeGroup.MapGet("/confirmEmail", async Task<Results<ContentHttpResult, UnauthorizedHttpResult>> 336accountGroup.MapGet("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>>
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
1304authGroup.MapGet("/hello", 1307authGroup.MapGet("/claims", (ClaimsPrincipal user) => user.Claims.Select(c => new { c.Type, c.Value }));
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (11)
EndpointMetadataApiDescriptionProviderTest.cs (11)
835builder.MapGet("/api/todos", () => "").ProducesProblem(StatusCodes.Status400BadRequest); 860builder.MapGet("/api/todos", () => "").Produces<InferredJsonClass>().WithGroupName(endpointGroupName); 885builder.MapGet("/api/todos", () => "").Produces<InferredJsonClass>().ExcludeFromDescription(); 907builder.MapGet("/api/todos", () => "") 959builder.MapGet("/api/todos", () => "") 1060builder.MapGet("/api/todos", [ProducesResponseType(typeof(List<string>), StatusCodes.Status200OK)] () => "") 1362builder.MapGet("/api/todos/{name}", GetName); 1402builder.MapGet("/api/todos/{name:minlength(8):guid:maxlength(20)}", (string name) => ""); 1430builder.MapGet("/api/todos/{id}", (int id) => "").WithDescription("A description").WithSummary("A summary"); 1461builder.MapGet("/api/todos/{id}", [EndpointSummary("A summary")][EndpointDescription("A description")] (int id) => ""); 1495builder.MapGet(pattern, (int Id) => "");
Microsoft.AspNetCore.OpenApi (1)
Extensions\OpenApiEndpointRouteBuilderExtensions.cs (1)
31return endpoints.MapGet(pattern, async (HttpContext context, string documentName = OpenApiConstants.DefaultDocumentName) =>
Microsoft.AspNetCore.OpenApi.Microbenchmarks (6)
GenerationBenchmarks.cs (2)
31_builder.MapGet("/", () => { }); 34_builder.MapGet($"/{i}", (int i) => new Todo(1, "Write benchmarks", false, DateTime.Now));
TransformersBenchmark.cs (4)
32_builder.MapGet("/", () => { }); 44_builder.MapGet("/", () => { }); 60_builder.MapGet("/", () => { }); 72_builder.MapGet("/", () => { });
Microsoft.AspNetCore.OpenApi.Tests (130)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Operations.cs (11)
20builder.MapGet("/api/todos", () => { }).WithSummary(summary); 38builder.MapGet("/api/todos", () => { }).WithSummary(summary).WithSummary(summary + "1"); 56builder.MapGet("/api/todos", () => { }).WithDescription(description); 74builder.MapGet("/api/todos", () => { }).WithDescription(description).WithDescription(description + "1"); 91builder.MapGet("/api/todos", () => { }).WithTags(["todos", "v1"]); 115builder.MapGet("/api/todos", () => { }).WithTags(["todos", "v1"]).WithTags(["todos", "v2"]); 139builder.MapGet("/api/todos", () => { }); 163builder.MapGet("/api/todos", () => { }).WithTags(["todos", "v1"]); 164builder.MapGet("/api/users", () => { }).WithTags(["users", "v1"]); 191builder.MapGet("/api/todos", () => { }).WithName("GetTodos"); 209builder.MapGet("/api/todos", [EndpointName("GetTodos")] () => { });
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Parameters.cs (21)
19builder.MapGet("/api/todos/{id}", (int id) => { }); 20builder.MapGet("/api/todos", (int id) => { }); 21builder.MapGet("/api", ([FromHeader(Name = "X-Header")] string header) => { }); 48builder.MapGet("/api/todos/{id}", (int id) => { }); 49builder.MapGet("/api/todos/{guid}", (Guid? guid) => { }); 50builder.MapGet("/api/todos/{isCompleted}", (bool isCompleted = false) => { }); 74builder.MapGet("/api/todos", (int id) => { }); 75builder.MapGet("/api/users", (int? id) => { }); 76builder.MapGet("/api/projects", (int id = 1) => { }); 100builder.MapGet("/api/todos", ([FromHeader(Name = "X-Header")] string header) => { }); 101builder.MapGet("/api/users", ([FromHeader(Name = "X-Header")] Guid? header) => { }); 102builder.MapGet("/api/projects", ([FromHeader(Name = "X-Header")] string header = "0000-0000-0000-0000") => { }); 129builder.MapGet("/api/todos/{id}", (int id) => { }); 130builder.MapGet("/api/todos/{guid}", (Guid? guid) => { }); 131builder.MapGet("/api/todos/{isCompleted}", (bool isCompleted = false) => { }); 176builder.MapGet("/api/accept", ([FromHeader(Name = "Accept")] string value) => { }); 177builder.MapGet("/api/accept-lower", ([FromHeader(Name = "accept")] string value) => { }); 178builder.MapGet("/api/authorization", ([FromHeader(Name = "Authorization")] string value) => { }); 179builder.MapGet("/api/authorization-lower", ([FromHeader(Name = "authorization")] string value) => { }); 180builder.MapGet("/api/content-type", ([FromHeader(Name = "Content-Type")] string value) => { }); 181builder.MapGet("/api/content-type-lower", ([FromHeader(Name = "content-type")] string value) => { });
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Paths.cs (7)
17builder.MapGet("/api/todos", () => { }); 18builder.MapGet("/api/users", () => { }); 52builder.MapGet("/api/todos", () => { }).WithMetadata(new EndpointGroupNameAttribute("v1")); 53builder.MapGet("/api/users", () => { }).WithMetadata(new EndpointGroupNameAttribute("v2")); 77builder.MapGet("/api/todos", () => { }); 108builder.MapGet("/api/todos/{id}", () => { }); 148builder.MapGet("/api/todos/{id:int}", () => { });
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.RequestBody.cs (1)
820builder.MapGet("/resume", ([FromForm] ResumeUpload model) => { });
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (12)
18builder.MapGet("/api/todos", 49builder.MapGet("/api/todos", () => { }) 70builder.MapGet("/api/todos", () => { }) 95builder.MapGet("/api/todos", () => { }) 121builder.MapGet("/api/todos", () => { }) 150builder.MapGet("/api/todos", () => { }) 176builder.MapGet("/api/todos", () => { }); 195builder.MapGet("/api/todos", [Produces("application/json", "application/xml")] () => new Todo(1, "Test todo", false, DateTime.Now)); 223builder.MapGet("/api/todos", [ProducesDefaultResponseType(typeof(Error))] () => { }); 255builder.MapGet("/api/todos", [ProducesDefaultResponseType(typeof(Error))] () => { }) 318builder.MapGet("/api/todos", 349builder.MapGet("/api/todos",
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (1)
242builder.MapGet("/array-parsable", (Guid[] guids) => { });
Transformers\DocumentTransformerTests.cs (15)
17builder.MapGet("/todo", () => { }); 18builder.MapGet("/user", () => { }); 44builder.MapGet("/todo", () => { }); 45builder.MapGet("/user", () => { }); 61builder.MapGet("/todo", () => { }); 62builder.MapGet("/user", () => { }); 79builder.MapGet("/todo", () => { }); 105builder.MapGet("/todo", () => { }); 130builder.MapGet("/todo", () => { }); 131builder.MapGet("/user", () => { }); 149builder.MapGet("/todo", () => { }); 150builder.MapGet("/user", () => { }); 169builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 197builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 224builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (2)
274builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 459builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\OperationTransformerTests.cs (24)
17builder.MapGet("/todo", () => { }); 18builder.MapGet("/user", () => { }); 51builder.MapGet("/todo", () => { }); 52builder.MapGet("/user", () => { }); 144builder.MapGet("/todo", () => { }); 145builder.MapGet("/user", () => { }); 183builder.MapGet("/todo", () => { }); 184builder.MapGet("/user", () => { }); 216builder.MapGet("/todo", () => { }); 217builder.MapGet("/user", () => { }); 245builder.MapGet("/todo", () => { }); 246builder.MapGet("/user", () => { }); 275builder.MapGet("/todo", () => { }); 276builder.MapGet("/user", () => { }); 325builder.MapGet("/todo", () => { }); 326builder.MapGet("/user", () => { }); 344builder.MapGet("/todo", () => { }); 345builder.MapGet("/user", () => { }); 375builder.MapGet("/todo", () => { }); 376builder.MapGet("/user", () => { }); 407builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 434builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 461builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 462builder.MapGet("/todo-2", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\SchemaTransformerTests.cs (23)
74builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 111builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 129builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 179builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 209builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 239builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 262builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 286builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 324builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 361builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 387builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 413builder.MapGet("/todo", (int id) => { }); 445builder.MapGet("/list", () => new List<int> { 1, 2, 3, 4 }); 446builder.MapGet("/single", () => 1); 515builder.MapGet("/list-of-todo", () => new List<Todo> { new Todo(1, "Item1", false, DateTime.Now) }); 516builder.MapGet("/list-of-int", () => new List<int> { 1, 2, 3, 4 }); 551builder.MapGet("/list", () => new List<Shape> { new Triangle { Hypotenuse = 12, Color = "blue", Sides = 3 }, new Square { Area = 24, Color = "red ", Sides = 4 } }); 592builder.MapGet("/list", () => new PolymorphicContainer()); 633builder.MapGet("/list", () => new List<PolymorphicContainer>()); 708builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 764builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 791builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 818builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\TypeBasedTransformerLifetimeTests.cs (13)
18builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 40builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 66builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 92builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 117builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 139builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 164builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 190builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 215builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 236builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 259builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 285builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 311builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Microsoft.AspNetCore.Routing (1)
RouteHandlerOptions.cs (1)
12/// Options for controlling the behavior of <see cref="EndpointRouteBuilderExtensions.MapGet(IEndpointRouteBuilder, string, Delegate)"/>
Microsoft.AspNetCore.Routing.Tests (15)
Builder\GroupTest.cs (12)
28group.MapGet("/{id}", (int id, HttpContext httpContext) => 59group.MapGet("/{id}", (string org, int id, HttpContext httpContext) => 93group.MapGet("/", (string org, int id, HttpContext httpContext) => 125builder.MapGroup("/{ID}").MapGroup("/{id}").MapGet("/", () => { }); 158inner.MapGet("/foo", () => "Hello World!"); 186group.MapGet("/foo", () => "Hello World!"); 209group.MapGet("/", () => 242group.MapGet("/foo", () => "Hello World!"); 265group.MapGet("/", () => 323inner.MapGet("/foo", () => "Hello World!").WithMetadata("/foo"); 340group.MapGet("/foo", () => "foo"); 341group.MapGet("/bar", () => "bar");
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (3)
35routes.MapGet(template, action); 1027group.MapGet("/endpoint", () => { }).Finally(b => b.Metadata.Add("added-from-endpoint")); 1059var handler = innerGroup.MapGet("/endpoint", () => { });
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Startup.cs (1)
117endpoints.MapGet("/generateJwtToken/{name?}", (HttpContext context, string name) =>
Microsoft.AspNetCore.Tests (24)
WebApplicationTests.cs (24)
1579app.MapGet("/new", () => "new"); 1618app.MapGet("/1", () => "1"); 1669app.MapGet("/defined", () => { }); 1864app.MapGet("/", () => "Hello World!").WithDisplayName("One"); 1868routes.MapGet("/hi", () => "Hi World").WithDisplayName("Two"); 1869routes.MapGet("/heyo", () => "Heyo World").WithDisplayName("Three"); 1899app.MapGet("/", () => "Hello World").WithDisplayName("One"); 1903endpoints.MapGet("/hi", () => "Hello Endpoints").WithDisplayName("Two"); 1955app.MapGet("/", () => "Hello World!").WithDisplayName("One"); 1964routes.MapGet("/heyo", () => "Heyo World").WithDisplayName("Three"); 2031app.MapGet("/", void () => throw new InvalidOperationException("BOOM")); 2083app.MapGet("/", void () => throw new InvalidOperationException("BOOM")); 2137app.MapGet("/{parameterName}", (int parameterName) => { }); 2162app.MapGet("/{parameterName}", (int parameterName) => { }); 2460app.MapGet("/hello", (ClaimsPrincipal user) => 2501app.MapGet("/hello", (ClaimsPrincipal user) => { }).AllowAnonymous(); 2551app.MapGet("/products/{productId:regex(^[a-z]{{4}}\\d{{4}}$)}", (string productId) => productId).WithDisplayName("RegexRoute"); 2577app.MapGet("/products/{productId:alpha:minlength(4):maxlength(4)}", (string productId) => productId).WithDisplayName("AlphaRoute"); 2595app.MapGet("/products/{productId:regex(^[a-z]{{4}}\\d{{4}}$)}", (string productId) => productId).WithDisplayName("AlphaRoute"); 2630app.MapGet("/products/{productId:regex(^[a-z]{{4}}\\d{{4}}$)}", (string productId) => productId).WithDisplayName("RegexRoute"); 2660app.MapGet("/products/{productId:regex(^[a-z]{{4}}\\d{{4}}$)}", (string productId) => productId).WithDisplayName("RegexRoute"); 2740app.MapGet("/hello", () => "hello world"); 2803app.MapGet("/hello", () => "hello world"); 2826endpoints.MapGet("/hello", () => "hello world");
MilvusPlayground.ApiService (2)
Program.cs (2)
20app.MapGet("/create", async (MilvusClient milvusClient, ILogger<Program> logger) => 103app.MapGet("/search", async (MilvusClient milvusClient, ILogger<Program> logger) =>
MinimalFormSample (2)
Program.cs (2)
16app.MapGet("/antiforgery", (HttpContext context, IAntiforgery antiforgery) => 35app.MapGet("/no-antiforgery", () =>
MinimalJwtBearerSample (2)
Program.cs (2)
22app.MapGet("/protected", (ClaimsPrincipal user) => $"Hello {user.Identity?.Name}!") 25app.MapGet("/protected-with-claims", (ClaimsPrincipal user) =>
MinimalOpenIdConnectSample (1)
Program.cs (1)
15app.MapGet("/protected", (ClaimsPrincipal user) => $"Hello {user.Identity?.Name}!")
MinimalSample (11)
Program.cs (11)
15app.MapGet("/plaintext", Plaintext); 17app.MapGet("/", () => $""" 41outer.MapGet("/outerget", () => "I'm nested."); 42inner.MapGet("/innerget", () => "I'm more nested."); 59superNested.MapGet("/", (string groupName, string nestedName) => 65app.MapGet("/json", Json).WithTags("json"); 68app.MapGet("/hello/{name}", SayHello); 70app.MapGet("/null-result", IResult () => null!); 72app.MapGet("/todo/{id}", Results<Ok<Todo>, NotFound, BadRequest> (int id) => id switch 83app.MapGet("/problem/{problemType}", (string problemType) => problemType switch 95app.MapGet("/todos", () => new Todo[] { new Todo(1, "Walk the dog"), new Todo(2, "Come back home") });
Mongo.ApiService (1)
Program.cs (1)
16app.MapGet("/", async (IMongoClient mongoClient) =>
MvcSandbox (1)
Startup.cs (1)
25endpoints.MapGet("/MapGet", () => "MapGet");
MySql.ApiService (2)
Program.cs (2)
20app.MapGet("/catalog", async (MySqlConnection db) => 30app.MapGet("/catalog/{id}", async (int id, MySqlConnection db) =>
Nats.ApiService (3)
Program.cs (3)
23app.MapGet("/ping", async (INatsConnection nats) => 36app.MapGet("/stream/{name}", async (string name, INatsJSContext jetStream) => 57app.MapGet("/consume/{name}", async (string name, INatsJSContext jetStream) =>
OracleEndToEnd.ApiService (1)
Program.cs (1)
15app.MapGet("/", async (MyDbContext dbContext) =>
OrleansClient (1)
Program.cs (1)
11app.MapGet("/counter/{grainId}", async (IClusterClient client, string grainId) =>
OrleansServer (1)
Program.cs (1)
12app.MapGet("/", () => "OK");
ParameterEndToEnd.ApiService (1)
Program.cs (1)
17app.MapGet("/", async (MyDbContext context) =>
PostgresEndToEnd.ApiService (1)
Program.cs (1)
27app.MapGet("/", async (MyDb1Context db1Context, MyDb2Context db2Context, MyDb3Context db3Context, MyDb4Context db4Context, MyDb5Context db5Context, MyDb6Context db6Context, MyDb7Context db7Context, MyDb8Context db8Context, MyDb9Context db9Context) =>
ProxylessEndToEnd.ApiService (2)
Program.cs (2)
15app.MapGet("/", () => 20app.MapGet("/redis", ([FromKeyedServices("redis")] IConnectionMultiplexer redis) =>
Qdrant.ApiService (2)
Program.cs (2)
19app.MapGet("/create", async (QdrantClient client, ILogger<Program> logger) => 85app.MapGet("/search", async (QdrantClient client) =>
RateLimitingSample (4)
Program.cs (4)
53app.MapGet("/", () => "Hello World!").RequireRateLimiting(helloName); 56app.MapGet("/todoitems", async (TodoDb db) => 61app.MapGet("/todoitems/complete", async (TodoDb db) => 65app.MapGet("/todoitems/{id}", async (int id, TodoDb db) =>
Redis.ApiService (9)
Program.cs (9)
15app.MapGet("/redis/ping", async (IConnectionMultiplexer connection) => 20app.MapGet("/redis/set", async (IConnectionMultiplexer connection) => 25app.MapGet("/redis/get", async (IConnectionMultiplexer connection) => 31app.MapGet("/garnet/ping", async ([FromKeyedServices("garnet")] IConnectionMultiplexer connection) => 36app.MapGet("/garnet/set", async ([FromKeyedServices("garnet")] IConnectionMultiplexer connection) => 41app.MapGet("/garnet/get", async ([FromKeyedServices("garnet")] IConnectionMultiplexer connection) => 47app.MapGet("/valkey/ping", async ([FromKeyedServices("valkey")] IConnectionMultiplexer connection) => 52app.MapGet("/valkey/set", async ([FromKeyedServices("valkey")] IConnectionMultiplexer connection) => 57app.MapGet("/valkey/get", async ([FromKeyedServices("valkey")] IConnectionMultiplexer connection) =>
Sample (17)
EndpointRouteBuilderExtensions.cs (1)
11return endpoints.MapGet("/swagger/{documentName}", (string documentName) => Results.Content($$"""
Program.cs (16)
77v1.MapGet("/array-of-guids", (Guid[] guids) => guids); 81v1.MapGet("/todos/{id}", (int id) => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now)) 84v2.MapGet("/users", () => new [] { "alice", "bob" }) 90responses.MapGet("/200-add-xml", () => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now)) 93responses.MapGet("/200-only-xml", () => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now)) 96responses.MapGet("/triangle", () => new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 }); 97responses.MapGet("/shape", Shape () => new Triangle { Color = "blue", Sides = 4 }); 99schemas.MapGet("/typed-results", () => TypedResults.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })); 100schemas.MapGet("/multiple-results", Results<Ok<Triangle>, NotFound<string>> () => Random.Shared.Next(0, 2) == 0 103schemas.MapGet("/iresult-no-produces", () => Results.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })); 104schemas.MapGet("/iresult-with-produces", () => Results.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })) 106schemas.MapGet("/primitives", ([Description("The ID associated with the Todo item.")] int id, [Description("The number of Todos to fetch")] int size) => { }); 107schemas.MapGet("/product", (Product product) => TypedResults.Ok(product)); 108schemas.MapGet("/account", (Account account) => TypedResults.Ok(account)); 112schemas.MapGet("/dictionary-of-ints", () => new Dictionary<string, int> { { "one", 1 }, { "two", 2 } }); 113schemas.MapGet("/frozen-dictionary-of-ints", () => ImmutableDictionary.CreateRange(new Dictionary<string, int> { { "one", 1 }, { "two", 2 } }));
Seq.ApiService (1)
Program.cs (1)
17app.MapGet("/", () =>
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
246endpoints.MapGet("/clientresult/{id}", async (IHubContext<TestHub> hubContext, string id) =>
SimpleWebSiteWithWebApplicationBuilder (9)
Program.cs (9)
22app.MapGet("/", () => "Hello World"); 24app.MapGet("/json", () => Json(new Person("John", 42))); 26app.MapGet("/ok-object", () => Ok(new Person("John", 42))); 28app.MapGet("/accepted-object", () => Accepted("/ok-object", new Person("John", 42))); 30app.MapGet("/many-results", (int id) => 40app.MapGet("/problem", () => Results.Problem("Some problem")); 42app.MapGet("/environment", (IHostEnvironment environment) => environment.EnvironmentName); 43app.MapGet("/webroot", (IWebHostEnvironment environment) => environment.WebRootPath); 45app.MapGet("/greeting", (IConfiguration config) => config["Greeting"]);
SimpleWebSiteWithWebApplicationBuilderException (1)
Program.cs (1)
6app.MapGet("/", (Func<string>)(() => "Hello World"));
SqlServerEndToEnd.ApiService (1)
Program.cs (1)
17app.MapGet("/", async (MyDb1Context db1Context, MyDb2Context db2Context) =>
Stress.ApiService (13)
Program.cs (13)
30app.MapGet("/", () => "Hello world"); 32app.MapGet("/write-console", () => 49app.MapGet("/increment-counter", (TestMetrics metrics) => 58app.MapGet("/big-trace", async () => 70app.MapGet("/trace-limit", async () => 88app.MapGet("/http-client-requests", async (HttpClient client) => 101app.MapGet("/log-message-limit", async ([FromServices] ILogger<Program> logger) => 119app.MapGet("/log-message", ([FromServices] ILogger<Program> logger) => 136app.MapGet("/many-logs", (ILoggerFactory loggerFactory, CancellationToken cancellationToken) => 180app.MapGet("/producer-consumer", async () => 189app.MapGet("/log-formatting", (ILoggerFactory loggerFactory) => 237app.MapGet("/duplicate-spanid", async () => 249app.MapGet("/multiple-traces-linked", async () =>
TestingAppHost1.MyWebApp (1)
Program.cs (1)
23app.MapGet("/weatherforecast", () =>
TestProject.IntegrationServiceA (5)
Postgres\NpgsqlEFCoreExtensions.cs (1)
10app.MapGet("/efnpgsql/verify", VerifyNpgsqlEFCoreAsync);
Postgres\PostgresExtensions.cs (1)
10app.MapGet("/postgres/verify", VerifyPostgresAsync);
Program.cs (2)
33app.MapGet("/", () => "Hello World!"); 35app.MapGet("/pid", () => Environment.ProcessId);
Redis\RedisExtensions.cs (1)
10app.MapGet("/redis/verify", VerifyRedisAsync);
TestProject.ServiceA (3)
Program.cs (3)
10app.MapGet("/", () => "Hello World!"); 11app.MapGet("/pid", () => Environment.ProcessId); 13app.MapGet("/urls", (IServiceProvider sp) => sp.GetService<IServer>()?.Features?.Get<IServerAddressesFeature>()?.Addresses);
TestProject.ServiceB (2)
Program.cs (2)
7app.MapGet("/", () => "Hello World!"); 8app.MapGet("/pid", () => Environment.ProcessId);
TestProject.ServiceC (2)
Program.cs (2)
7app.MapGet("/", () => "Hello World!"); 8app.MapGet("/pid", () => Environment.ProcessId);
WaitForSandbox.ApiService (1)
Program.cs (1)
16app.MapGet("/", async (MyDbContext dbContext) =>
WebPubSubWeb (2)
Program.cs (2)
34app.MapGet("/negotiate/chat", ([FromKeyedServices(Constants.ChatHubName)] WebPubSubServiceClient service) => 43app.MapGet("/negotiate/notification", ([FromKeyedServices(Constants.NotificationHubName)] WebPubSubServiceClient service) =>