FromFormAttribute is in wrong namespace. #56162
-
in above code, if i use [FromForm], i need add below namespace:
but i don't use any Mvc features, so the class Microsoft.AspNetCore.Mvc.FromFormAttribute( [FromForm]) is in wrong namespace, thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
martincostello
Jun 10, 2024
Replies: 1 comment 1 reply
-
This is an historical artifact - the team are aware of it, but moving it would be a hugely breaking change. If you wish to avoid using the attribute entirely because of its presence in the MVC namespace, then you can implement your own using |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lbgitjp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an historical artifact - the team are aware of it, but moving it would be a hugely breaking change.
If you wish to avoid using the attribute entirely because of its presence in the MVC namespace, then you can implement your own using
IFromFormMetadata
like this which should work the same in a Minimal API.