search
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
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)
Ok I fixed it by removing the line below. I think AddContactAddress tries to create new one while saving. SaveChanges works. Thanks.
contact.AddContactAddress(billingAddress);
How to update existing CustomerContact in Commerce? We have UpdateContactAddress and UpdateCreditCard. But i want to update firstname, Lastname etc in CustomerContact..