protected IActionResult CustomResponse() { if (_domainNotificationHandler.HasNotification()) { return(UnprocessableEntity(new { errors = _domainNotificationHandler.GetNotifications() })); } return(Ok()); }
protected bool Commit() { if (domainNotifications.HasNotification()) { return(false); } if (unitOfWork.Commit()) { return(true); } this.AddNotification("Houve um problema ao salvar os dados!"); return(false); }
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); }
protected bool ValidOperation() { return(!_notifications.HasNotification()); }
protected bool OperacaoValida() { return(!_notifications.HasNotification()); }
public bool HasNotification() { return(_notifications.HasNotification()); }
protected bool HasNotifications() { return(_notifications.HasNotification()); }
protected async Task <bool> IsValidOperation() { return(!await _notifications.HasNotification()); }