mauzinister
mauzinister

Reputation: 41

WCF Simultaneous Update of Objects in callback

Is it possible to update multiple objects in one callback channel simultaneously properly? I am developing a software right now and I have put multiple objects under one callback channel. These objects should be accessed by my client simultaneously. Problem is, there was only one object that is being updated, and the others were not.

Upvotes: 0

Views: 121

Answers (1)

Jorge Alvarado
Jorge Alvarado

Reputation: 2674

technically speaking when you are using WCF you will try to have a certain design like SOA, so instead of calling WCF services multiple times for a single operation, is better if you think of it like a holistic method, like AddNewOrder, and your parameter for that method will be a complex object like the following class:

public class AddNewOrderRequest{
    public List<Products> Products
    public Person BuyerOfOrder
    //etc etc
    //many other elements that need to be persisted
}

and then calling your WCF service, do it like this:

AddNewOrderResponse response = MyOrderService.AddOrder(AddNewOrderRequest request);

I hope, it helps.

Upvotes: 1

Related Questions