I'm calling the IOrderRepository method Save that takes an IOrderGroup, but the TaxTotal amount I update is not persisting to the database.
Here is a code snippet (pulled from many methods to be concise)...
var purchaseOrder = _orderRepository.Load(orderId); var order = purchaseOrder as OrderGroup; if (order != null && taxResult?.TotalTaxes != null) { order.TaxTotal = taxResult.TotalTaxes.MoneyValue; // I see this get set to a dollar amount } if (order != null) { var orderGroup = order as OrderGroup; if (orderGroup == null) { result = _orderRepository.Save(order); } else { // at this point, I still see the dollar amount set above result = _orderRepository.Save(orderGroup); // this is the code path that gets executed } }
End result is a TaxTotal of 0.0 in OrderGroup table. This is driving me crazy. Any help will be appreciated.