jdana
asked on
Missing some key nuances of configuring an ASP.NET MVC app to handle RESTful requests.
I've boldly lept into the Ember.js universe, and my Ember advisors are awesome. Here's the rub, I'm locked into an IIS / ASP.NET / MSSQL combo for my web / application / DB due to client requirements. The MSSQL element is a good thing; I know it well. The IIS / ASP.NET elements, however, have been giving me trouble.
I've been using the ASP.NET MVC API template for Ember.js by Xinyang Qiu, Nathan Totten, and Thiago Santos as a starting point. While the API contains some real gems, there are aspects of it that mystify me: A simple POST request hits the API. The following screenshot represents the request, the request headers, and the request payload.
The above request results in the following method being called in the API's controller. Additionally, todoListDto, the data-transfer object, is fully populated with the request payload.
How is the API pulling this off?
I recognize that I'm no ASP.NET MVC expert, far from it. I simply need to know enough of ASP.NET MVC to build a RESTful API for Ember.js. I'm not shy of going to the literature. Just point me to the right literature. I'm also not shy about asking for help. If you can point me to an appropriate online community, I'm happy to go there.
I've been using the ASP.NET MVC API template for Ember.js by Xinyang Qiu, Nathan Totten, and Thiago Santos as a starting point. While the API contains some real gems, there are aspects of it that mystify me: A simple POST request hits the API. The following screenshot represents the request, the request headers, and the request payload.
The above request results in the following method being called in the API's controller. Additionally, todoListDto, the data-transfer object, is fully populated with the request payload.
How is the API pulling this off?
The above method, PostTodoList, is of the type HttpResponseMessage. I suspect that's part of it.
PostTodoList is in the class TodoListController which derives from ApiController. That may be part of it.
Global.asax calls a few methods at startup that I suspect play a key role in the process.
I recognize that I'm no ASP.NET MVC expert, far from it. I simply need to know enough of ASP.NET MVC to build a RESTful API for Ember.js. I'm not shy of going to the literature. Just point me to the right literature. I'm also not shy about asking for help. If you can point me to an appropriate online community, I'm happy to go there.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
John, I appreciate the offer, however I'm currently swamped with a couple of projects.
Thank you,
Dustin
Thank you,
Dustin
ASKER
Steller solution. Thanks again, Dustin.
J
J
ASKER
Wow. This is a terrific response. Any chance you're free to do some consulting work on this project? My Ember guru, Ian, has been insistent, "Conform with the JSON API." I think he's right, but accomplishing this on the .NET side currently feels daunting. I'm confident you could save me days, if not weeks, of effort. Let me know if you're interested.
John