Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Harry Gordon 6 posts 71 karma points c-trib
    Nov 22, 2013 @ 20:05
    Harry Gordon

    Surface Controller via web service (?)

    Hello all!

    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!

  • Tim Geyssens 6419 posts 15052 karma points MVP 2x c-trib
    Nov 22, 2013 @ 20:15
  • Harry Gordon 6 posts 71 karma points c-trib
    Nov 22, 2013 @ 20:25
    Harry Gordon

    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 ( I didn't realise it would handle my model binding needs.

    I'll make a note to check Umbraco TV next time before posting! :)

Please Sign in or register to post replies

Write your reply to: