How to update existing CustomerContact in Commerce? We have UpdateContactAddress and UpdateCreditCard. But i want to update firstname, Lastname etc in CustomerContact..
You can just set those properties directly then call .SaveChanges to persist them
When I call SaveChanges , I am getting the error below.
Violation of PRIMARY KEY constraint 'PK__cls_Addr__091C2AFB0A47054F'. Cannot insert duplicate key in object 'dbo.cls_Address'. The duplicate key value is (9ddf0897-569d-49f5-ad42-9431798187be)
How does your code look like?
Ok I fixed it by removing the line below. I think AddContactAddress tries to create new one while saving. SaveChanges works. Thanks.