Ejemplo n.º 1
0
        public async Task <IActionResult> GetAsync(int id)
        {
            try
            {
                logger.LogInformation($"Getting user details for {id}");

                return(Ok(await manageUser.GetUserAsync(id)));
            }
            catch (Exception ex)
            {
                logger.LogError(ex.Message);
                return(StatusCode((int)HttpStatusCode.InternalServerError, "Internal Server error. Try again later"));
            }
        }