public Task <PurchaseOrder> UpdatePurchaseOrder(PurchaseOrder.IUpdatePurchaseOrderBuilder updatePurchaseOrderBuilder)
        {
            var entity = updatePurchaseOrderBuilder.Build();

            if (!_notificationHandler.HasNotification())
            {
                _manager.List.RemoveAll(c => c.Id == entity.Id);
                _manager.List.Add(entity);
            }

            return(entity.AsTask());
        }
        public async Task <PurchaseOrder> UpdatePurchaseOrder(PurchaseOrder.IUpdatePurchaseOrderBuilder updatePurchaseOrderBuilder)
        {
            var purchaseOrder = updatePurchaseOrderBuilder.Build();

            if (Notification.HasNotification())
            {
                return(purchaseOrder);
            }

            purchaseOrder = await _repository.Update(purchaseOrder);

            return(purchaseOrder);
        }