public void ResetDatabase()
        {
            try
            {
                ExpenseServiceClient proxy = new ExpenseServiceClient();

                // Get a list of active expenses.
                List<Expense> expensesList = proxy.ListActiveExpenses();

                if (expensesList.Count > 0)
                {
                    throw new ApplicationException("Cannot reset ExpenseSample database when there are active expenses. Please Cancel all active expenses and then try again.");
                }

                proxy.Purge();
                proxy.Close();
            }
            catch (FaultException<ProcessExecutionFault> ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }