-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routing
Milestone
Description
- Don't call the overloads "MapAction". Add overloads to the existing MapGet/MapPost/MapDelete/Map extension methods. We should remove the existing MapAction method.
namespace Microsoft.AspNetCore.Builder
{
public static class EndpointRouteBuilderExtensions
{
public static IEndpointConventionBuilder Map(this IEndpointRouteBuilder endpoints, string pattern, Delegate action);
public static IEndpointConventionBuilder MapGet(this IEndpointRouteBuilder endpoints, string pattern, Delegate action);
public static IEndpointConventionBuilder MapPost(this IEndpointRouteBuilder endpoints, string pattern, Delegate action);
public static IEndpointConventionBuilder MapPut(this IEndpointRouteBuilder endpoints, string pattern, Delegate action);
public static IEndpointConventionBuilder MapDelete(this IEndpointRouteBuilder endpoints, string pattern, Delegate action);
}
- Create overloads without the
string pattern
parameter for people you still want to useRouteAttribute
. This should throw anInvalidOperationException
if there's no route attribute.
namespace Microsoft.AspNetCore.Builder
{
public static class EndpointRouteBuilderExtensions
{
public static IEndpointConventionBuilder Map(this IEndpointRouteBuilder endpoints, Delegate action);
}
}
Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routing