August 2012
Intermediate to advanced
490 pages
9h 14m
English
Let's go ahead and add some code to allow for updating customer details by following these steps:
ICustomerService to add the operation shown in the following code:[OperationContract] void Update(Customer customer);
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 ...Read now
Unlock full access