public void GetOrders(int customerID,Action<GetOrderByCustomerResponse,Exception> callback) { OrderServiceClient orderServiceClient = new OrderServiceClient(); try { if (callback != null) orderServiceClient.GetOrderByCustomerCompleted += (s,e)=>callback(e.Result,e.Error); orderServiceClient.GetOrderByCustomerAsync(new GetOrderByCustomerReguest { CustomerID = customerID }); } catch (Exception exception) { string message = string.Format("An error occured while in type :{0} , method :{1} ", "OrderServiceManager", MethodBase.GetCurrentMethod().Name); CommonLogManager.Log.Error(message, exception); throw; } finally { orderServiceClient.Close(); } }