Such as controller named User method called GetUsers
Access to http://* * *. Com/API/user/getusers
thank you
CodePudding user response:
How before, now, still don't have special statement is.net core 3.1Have been so from the first edition of webapi, please change the default routing, please take the action, not the action of routing can not set up multiple get
CodePudding user response:
Endpoints. MapControllerRoute (
Name: "default",
The pattern: "{controller=Home}/{action=Index}/{id? } ");
This is not all to bring the action?
CodePudding user response:
Core nearly broke the traditional asp.net MVC/web API framework to integrate in, development way almost unchanged, can be configured routing template or format to specify the path using Route features,CodePudding user response:
But I again official documents, and found no configuration in different ways, may be I don't find the right, who is understanding, also please note thatCodePudding user response:
3.1 are not ripe, 2 x should be similar to # 2 way, or, in front of the controller are defined routing:[Route (" API/[controller]/[action] ")]
Public class XXXController
CodePudding user response:
Is configured routing,The route set {controller}/{action}/{id}