public async Task <IActionResult> GetClient(Guid id)
        {
            try
            {
                var api = await _clientQueries.GetClientAsync(id);

                return(Ok(api));
            }
            catch (KeyNotFoundException ex)
            {
                return(NotFound());
            }
            catch (ArgumentException argumentException)
            {
                return(BadRequest(argumentException.Message));
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetClient([FromRoute] Guid id)
        {
            var api = await _clientQueries.GetClientAsync(id);

            return(Ok(api));
        }