示例#1
0
        protected new IActionResult Response(object dataResult = null)
        {
            if (HasNotifications())
            {
                return(Ok(new OkApiResponse(dataResult)));
            }

            var notifications = _mediatorService.GetNotifications().OfType <DomainNotification>();

            return(BadRequest(new ErrorApiResponse(notifications.Select(x => x.Message).ToArray())));
        }