Sequencing Operations in a WCF Service
When using the PerSession instance context mode, it is often useful to be able to control the order in which a client application invokes operations in a WCF service. Revisiting the ShoppingCartService service, suppose that you decide to use the PerSession instance context mode rather than PerCall. In this scenario, it might not make sense to allow the client application to remove an item from the shopping cart, query the contents of the shopping cart, or perform a checkout operation, if the user has not actually added any items to the shopping cart. Equally, it would be questionable practice to allow the user to add an item to the shopping cart after the user has already checked out and paid for the items ...
Get Microsoft® Windows® Communication Foundation Step by Step now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.