Posting to web service from MVC website, bypass controller?

So my web service is all dressed up and ready to go. I just need to find hosting for it.

The service (among other things) allows my users to register their store on my loyalty programme which is to say that there is a function in the StoreController in the web service that accepts input from a client to add a record to the store table in the database. Sorry for my punctuation.

Now I'm writing an MVC site that I intend to use to manage the store records (among other things). This is the portal that users will employ to register their store on my loyalty programme.

My question is, when I write my ajax post on the views in this MVC site, do I write it so that it posts remotely to the web service using the url attribute in the ajax post set to the controller/action that I'm doing, or is there some way to tie in the controllers on this website to the ones in the web service?

What's best practice here?

by ortund via /r/csharp

Leave a Reply