Beispiel #1
0
        protected ActionResult CustomResponse(object result = null)
        {
            if (OperacaoValida())
            {
                return(Ok(new
                {
                    success = true,
                    data = result
                }));
            }

            return(BadRequest(new
            {
                success = false,
                errors = _notificator.GetAllNotifications().Select(n => n.Message)
            }));
        }