I have a custom table with a field that contains a field of type: time(7).
Reading up on other forums, it suggests that we should use the TimeSpan data type in .Net.
However, whenever the data is accessed by NopCommerce using the IRepository interface, it always has a value of null. This suggests that it doesn't convert the Time field to TimeSpan.
Is there anyone that has gotten this to work in NopCommerce?
In version 4.30 I have used the same entity. Added this in PluginBuilder to accept the nullable value. public override void MapEntity(CreateTableExpressionBuilder table) { table.WithColumn(nameof(CustomTable.Time)).AsTime().Nullable(); } public List<CustomTable> GetAllData() { return _customTableRepository.Table.ToList(); }
This is the service function to get the value. Still, you get the issue. you can share your sample code with me So I can more clear to you.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hai ancora qualche domanda o hai bisogno di aiuto?