Support binding parameters to type Uri in Minimal Actions #36649
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
help wanted
Up for grabs. We would accept a PR to help resolve this issue
old-area-web-frameworks-do-not-use
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Priority:3
Work that is nice to have
triage-focus
Add this label to flag the issue for focus at triage
Milestone
Is your feature request related to a problem? Please describe.
In MVC controllers actions, it is possible to strongly-type a parameter expected to be a URI as
Uri
. For example:However, attempting to replicate this with a Minimal Action endpoint results in an exception being thrown.
Describe the solution you'd like
Either of:
RequestDelegateFactory
) special-casesUri
to bind parameters;TryParse
orBindAsync
method cannot be added;Uri
type adds aTryParse()
method that can be consumed by the built-in binding.Additional context
Found using .NET SDK
6.0.100-rc.1.21458.32
to port an existing MVC application to use Minimal Actions.The text was updated successfully, but these errors were encountered: