Orders.com.BLL.Rules.ValidOrderStatusForUpdateRule.OnValidate C# (CSharp) Method

OnValidate() protected method

protected OnValidate ( ) : void
return void
        protected override void OnValidate()
        {
            var items = _orderItemDataProxy.GetByOrderCommand(_orderID).Execute().Value;
            if (items.Any(i => i.OrderStatus() is ShippedState))
            {
                Invalidate("This order cannot change because it has items that have been shipped");
            }
        }