I have same error which solved after I set product UpdatedOnUtc and CreatedOnUtc. Here is code to create a new product.
Product product = new Product(); product.Name = "Product Name"; product.Sku = "SKU"; product.Price = 10; //Price product.Published = true; product.UpdatedOnUtc = DateTime.UtcNow; // if you remove this line you got the error :An error occurred while updating the entries. product.CreatedOnUtc = DateTime.UtcNow; // if you remove this line you got the error :An error occurred while updating the entries.
It means when you prepare model then you can't leave DateTime to null. If DateTime is nullable it means it declare like DateTime? CreatedDate then it is fine to leave them null otherwise you have to assign a value to it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hâlen sorularınız mı var veya yardıma mı ihtiyacınız var?