Frage

I am trying to use the build-in attribute routing that comes with Mvc 5, previously I was using the AttributeRouting package on Nuget.

But how do i set up routes by specifying whether it is for a Get or Post request?

In AttributeRouting there was GET() and POST() attributes, but in Mvc 5 there is only a Route() Attribute?

War es hilfreich?

Lösung

You can still use the PostAttribute in MVC5, it's fully supported.

"The earlier style of routing, called convention-based routing, is still fully supported. In fact, you can combine both techniques in the same project."

source

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top