Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
7 Points
28 Posts
Apr 27, 2012 06:23 PM|LINK
I'm used to the Rest Preview 2, and I'm a BIT lost on this...
1) How does the "Route" corrospond to the controller class? So like this code:
RouteTable.Routes.MapHttpRoute( name: "PlacementsApi", routeTemplate: "apps/api/{controller}/{id}", defaults: new { id = System.Web.Http.RouteParameter.Optional } );
And this is the class
public class PlacementsController : ApiController
...How does the route know to call the "PlacementsController" class? Is it literally just removing the word "Controller" from the class name?
2) How do I create my own Restful verbage? Like with Rest Preview I could design the Uri and map the querystring\other parts back to variables.
Thanks,
Steve
sitefinityst...
Member
7 Points
28 Posts
Couple things I don't get :/
Apr 27, 2012 06:23 PM|LINK
I'm used to the Rest Preview 2, and I'm a BIT lost on this...
1) How does the "Route" corrospond to the controller class? So like this code:
RouteTable.Routes.MapHttpRoute( name: "PlacementsApi", routeTemplate: "apps/api/{controller}/{id}", defaults: new { id = System.Web.Http.RouteParameter.Optional } );And this is the class
...How does the route know to call the "PlacementsController" class? Is it literally just removing the word "Controller" from the class name?
2) How do I create my own Restful verbage? Like with Rest Preview I could design the Uri and map the querystring\other parts back to variables.
Thanks,
Steve