O'Reilly logo

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF by Muhammad Shujaat Siddiqi, Ryan Vice

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating customer details

Let's go ahead and add some code to allow for updating customer details by following these steps:

  1. Update ICustomerService to add the operation shown in the following code:
    [OperationContract]
    void Update(Customer customer);
    
  2. Update CustomerService to implement the new operation as shown in the following code:
    public void Update(Customer customer) { Data.Customer customerEntity = _northwindEntities .Customers.Single( c => c.CustomerID == customer.CustomerID); customerEntity.CompanyName = customer.CompanyName; customerEntity.ContactName = customer.ContactName; customerEntity.Address = customer.Address; customerEntity.City = customer.City; customerEntity.Country = customer.Country; customerEntity.Region = customer.Region; customerEntity.PostalCode ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required