예제 #1
0
        protected IActionResult CustomResponse()
        {
            if (_domainNotificationHandler.HasNotification())
            {
                return(UnprocessableEntity(new
                {
                    errors = _domainNotificationHandler.GetNotifications()
                }));
            }

            return(Ok());
        }
예제 #2
0
        protected bool Commit()
        {
            if (domainNotifications.HasNotification())
            {
                return(false);
            }
            if (unitOfWork.Commit())
            {
                return(true);
            }

            this.AddNotification("Houve um problema ao salvar os dados!");
            return(false);
        }
예제 #3
0
        public bool Commit()
        {
            if (domainNotifications.HasNotification())
            {
                return(false);
            }
            if (unitOfWork.Commit())
            {
                return(true);
            }

            mediator.RaiseEventAsync(new DomainNotification("Commit", "Houve um problema ao salvar os dados!"));
            return(false);
        }
        protected bool Commit()
        {
            if (_notifications.HasNotification())
            {
                return(false);
            }
            if (_uow.Commit())
            {
                return(true);
            }

            _mediator.PublicarEvento(new DomainNotification("Commit", "Ocorreu um erro ao salvar os dados no banco"));
            return(false);
        }
예제 #5
0
 protected bool ValidOperation()
 {
     return(!_notifications.HasNotification());
 }
예제 #6
0
 protected bool OperacaoValida()
 {
     return(!_notifications.HasNotification());
 }
 public bool HasNotification()
 {
     return(_notifications.HasNotification());
 }
예제 #8
0
 protected bool HasNotifications()
 {
     return(_notifications.HasNotification());
 }
예제 #9
0
 protected async Task <bool> IsValidOperation()
 {
     return(!await _notifications.HasNotification());
 }