public void BeforeUpdate(DbContext context, IEnumerable <Order> entities) { foreach (var order in entities) { order.ModifiedDate = Now; order.EnforceCorrectValuesOnDiscount(); OrderTriggerHelper.SetDateBeforeUpdate(order, Now); OrderTriggerHelper.EnforceRecalculateChange(order); } }
public void BeforeCreate(DbContext context, IEnumerable <Order> entities) { foreach (var order in entities) { order.StatusOrder = StatusOrder.CLOSE; order.EnforceCorrectValuesOnDiscount(); OrderTriggerHelper.SetDateBeforeCreate(order, Now); OrderTriggerHelper.EnforceRecalculateChange(order); } }