I am using MVC 2.0.
In one controller action I need to call a WCF Web service.
However, I only call this service in one scenario in my controller action.
So the problem is, the pattern for using the AsyncController, forces the Async (begin) action to be a void method.
Whilst it is only the Completed (callback) method that returns an Action Result.
This is my syncrhonous code below. So you can see my action needs to return an Action result in several scenarios
before i get to to make the call to the WCF service.
public ActionResult Register(int customerId)
var result = myWCFService.UpdateCustomer(customerId));
public bool DoSomething()
public bool DoSomethingElse()
So how can I turn the conditional wcf call of this action into an Asynchronous call?
I need to do the DoSomething work before, and potentially return an action result,
Then in some scenarios make the WCF call.
Thanks for your help.