public void OnExecuteSlice(Object sender, ExecutedRoutedEventArgs executedRoutedEventArgs) { // Create a disposable channel to the middle tier. using (WebServiceClient webServiceClient = new WebServiceClient(Properties.Settings.Default.WebServiceEndpoint)) { try { // This will create a batch of DestinationOrder records and send it to the web service to be executed by the destination broker. DataModel.BlotterRow blotterRow = DataModel.Blotter.BlotterKey.Find(this.BlotterId); List <DestinationOrderInfo> destinationOrders = this.ConstructDestinationOrder(blotterRow); webServiceClient.CreateDestinationOrders(destinationOrders.ToArray()); } catch (Exception exception) { // Log communication problems. Log.Error("{0}, {1}", exception.Message, exception.StackTrace); } } }