Microsoft 9GD00001 Computer Accessories User Manual


 
336 Microsoft Visual Studio 2010: A Beginner’s Guide
newCustID = svc.InsertCustomer(newCust)
Console.WriteLine("New Customer ID: " & newCustID)
Dim cust As New Customer
cust = svc.GetCustomer(newCustID)
cust.Income = 49000
svc.UpdateCustomer(cust)
Dim updatedCust As Customer
updatedCust = svc.GetCustomer(cust.CustomerID)
Console.WriteLine("Economic Adjustment: " & cust.Income)
svc.DeleteCustomer(updatedCust.CustomerID)
Dim customers As List(Of Customer)
'Dim customers As Customer()
customers = svc.GetCustomers()
End Sub
End Module
Deploying a Client That Consumes a Web Service
When deploying a client that uses a Web service, you need to update the address of the
service in the configuration file. The configuration file can vary, based on the type of
application you’ve built. Table 11-1 describes the configuration files for the application
types covered in this book.
Table 11-1 Configuration Files for Each Application Type
Application Type Configuration File
Console App.config
WPF App.config
ASP.NET MVC Web.config
Silverlight ServiceReferences.ClientConfig