public IHttpActionResult UpdateCustomer(CustomerModel customerToUpdate) { var entity = new Customer() { CustomerID = customerToUpdate.CustomerID, Address = customerToUpdate.Address, City = customerToUpdate.City, CompanyName = customerToUpdate.CompanyName, ContactName = customerToUpdate.ContactName, ContactTitle = customerToUpdate.ContactTitle, Country = customerToUpdate.Country, Fax = customerToUpdate.Fax, Phone = customerToUpdate.Phone, PostalCode = customerToUpdate.PostalCode, Region = customerToUpdate.Region }; _repository.UpdateCustomer(entity); return(Ok <CustomerModel>(customerToUpdate)); }