コード例 #1
0
 public async Task <IActionResult> GetUser(int userId)
 {
     try
     {
         return(Ok(await _iUserManagementHelper.GetUser(userId)));
     }
     catch (Exception ex)
     {
         return(NotFound(ex.Message));
     }
 }
コード例 #2
0
        public async Task <IActionResult> GetUser(int userId)
        {
            try
            {
                UserDetails user = await _iUserManagementHelper.GetUser(userId);

                return(Ok(user));
            }
            catch (Exception e)
            {
                return(NotFound(e.Message));
            }
        }
コード例 #3
0
        public async Task <IActionResult> GetUser(int userId)
        {
            log.Info("In UserController : GetUser(int userId)");
            try
            {
                //Checking userid in user and retriveing appropritate data
                UserDetails user = await _iUserManagementHelper.GetUser(userId);

                return(Ok(user));
            }
            catch (Exception e)
            {
                log.Error("Exception UserController: GetUser(int userId)" + e.Message);
                return(NotFound(e.Message));
            }
        }