We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 146855c commit f277f3aCopy full SHA for f277f3a
Nop.Plugin.Api/Controllers/CustomersController.cs
@@ -250,6 +250,12 @@ public IActionResult CreateCustomer([ModelBinder(typeof(JsonModelBinder<Customer
250
251
foreach (var address in customerDelta.Dto.CustomerAddresses)
252
{
253
+ // we need to explicitly set the date as if it is not specified
254
+ // it will default to 01/01/0001 which is not supported by SQL Server and throws and exception
255
+ if (address.CreatedOnUtc == null)
256
+ {
257
+ address.CreatedOnUtc = DateTime.UtcNow;
258
+ }
259
newCustomer.Addresses.Add(address.ToEntity());
260
}
261
0 commit comments