How do you assing a address to a customer? There is an endpoint $"{serverBaseUrlOData}Customers({CustomerID})/Addresses({AddressID})" but this doesn't labels a adres as Shipping or Billing address
WebApi: Set Billing and Shipping address to customer
Eröffnet von
TripleNico
, May 18 2020 03:16
4 Antworten zu diesem Thema
#1
Geschrieben: 18 May 2020 - 15:16
#2
Geschrieben: 19 May 2020 - 12:14
The assignment should actually take place via the customer entity (navigation property Customer.BillingAddress or Customer.ShippingAddress).
But I have not found a way to make this assignment via the API. I suspect that the ASP.NET Web API cannot do this out-of-box and that it will have to be upgraded manually. I've created an issue for this.
Marcus Gesing
Smartstore AG
#3
Geschrieben: 19 May 2020 - 13:22
Thanks for looking into this! Maybe an extension will help, like assign addresId to BillingAddressId? Like the way it is currently displayed in the database?
#4
Geschrieben: 19 May 2020 - 17:13
Unfortunately not. There is no BillingAddressId. The relationship is covered by Entity Framework.
Marcus Gesing
Smartstore AG
#5
Geschrieben: 20 May 2020 - 07:55
Ah that explains it why it is more difficult. Will track the github issue, hopefully you will find a way ;-)