Microsoft 9GD00001 Computer Accessories User Manual


 
Chapter 11: Deploying Web Services with WCF 335
Console.WriteLine("New Customer: " + cust.Name);
cust.Income = 49000m;
svc.UpdateCustomer(cust);
Customer updatedCust = svc.GetCustomer(cust.CustomerID);
Console.WriteLine("Economic Adjustment: " + cust.Income);
svc.DeleteCustomer(updatedCust.CustomerID);
//Customer[] customers = svc.GetCustomers();
List<Customer> customers = svc.GetCustomers();
Console.WriteLine("\nAll Customers:\n");
foreach (var custItem in customers)
{
Console.WriteLine(custItem.Name);
}
Console.ReadKey();
}
}
}
VB:
Imports CustomerConsoleVB.CustomerService
Module Module1
Sub Main()
Dim svc = New CustomerServiceClient
Dim newCust = New Customer
With newCust
.Age = 36
.Birthday = New DateTime(1974, 8, 22)
.Income = 56000
.Name = "Venus"
End With
Dim newCustID As Integer