Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm looking for a way to expose my forms (currently Surface Controllers) via web service without repeating myself too much - ideally I'd like to reuse the model (especially the validation) and anything else I can without it getting too icky. I was toying with using the Surface Controller actions (Friday induced madness) but I've boxed that idea - I'll just abstract the form logic out of the controller and do it that way.
My only question now is: is there a good way to bind post data to the model, preferably using the same mechanism MVC uses?
Thanks in advance, all thoughts and comments welcome!
Sounds like you need api controllers :) http://umbraco.tv/videos/developer/fundamentals/api-controllers/introduction/
Ahhh, thanks for the link Tim! I'm embarressed to say I'm actually not well versed in Umbraco's Web API stuff so when all I found was this resource (http://our.umbraco.org/documentation/Reference/WebApi/) I didn't realise it would handle my model binding needs.
I'll make a note to check Umbraco TV next time before posting! :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted