Пример #1
0
        public IActionResult Get(string customerId)
        {
            if (customerId == null)
            {
                return(BadRequest());
            }
            var response = _customerApplication.Get(customerId);

            if (response.IsSuccess)
            {
                return(Ok(response));
            }
            return(BadRequest(response.Message));
        }
Пример #2
0
        public IActionResult Get(string customerId)
        {
            if (string.IsNullOrEmpty(customerId))
            {
                return(BadRequest());
            }

            var response = _customerApplication.Get(customerId);

            if (response.IsSuccess)
            {
                return(Ok(response.Data));
            }

            return(BadRequest(response.Message));
        }
        public IActionResult Get(string dni)
        {
            if (string.IsNullOrWhiteSpace(dni))
            {
                return(BadRequest());
            }

            var response = application.Get(dni);

            if (response.IsSuccess)
            {
                return(Ok(response));
            }

            return(BadRequest(response.Message));
        }