public IActionResult Get(string userId)
        {
            try
            {
                var user = _userBll.GetUserById(userId);

                if (user == null)
                {
                    return(NotFound());
                }
                else
                {
                    return(Ok(user));
                }
            }
            catch (Exception)
            {
                return(StatusCode(500));
            }
        }
Exemple #2
0
        public IActionResult GetUserById(int id)
        {
            var user = _userBusinessLogic.GetUserById(id);

            return(Ok(user));
        }