Back to Aspnetcore

Route handlers in Minimal API apps

aspnetcore/fundamentals/minimal-apis/route-handlers.md

latest841 B
Original Source

Route Handlers in Minimal API apps

[!INCLUDE]

A configured WebApplication supports Map{Verb} and xref:Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapMethods%2A where {Verb} is a Pascal-cased HTTP method like Get, Post, Put or Delete:

[!code-csharp]

The xref:System.Delegate arguments passed to these methods are called "route handlers".

Route handlers

[!INCLUDE route handling]

Parameter binding

xref:fundamentals/minimal-apis/parameter-binding describes the rules in detail for how route handler parameters are populated.

Responses

xref:fundamentals/minimal-apis/responses describes in detail how values returned from route handlers are converted into responses.