Exemplo n.º 1
0
        protected new IActionResult Response(object obj = null, int code = 200)
        {
            if (_notify.Any())
            {
                return(BadRequest(new
                {
                    success = false,
                    errors = _notify.GetAll().Select(n => n.Message)
                }));
            }

            return(new ObjectResult(new
            {
                success = true,
                data = obj
            })
            {
                StatusCode = code
            });
        }
Exemplo n.º 2
0
 protected bool HasNotification()
 {
     return(_notify.Any());
 }