Example #1
0
        public IActionResult GetById(int id)
        {
            using (var scope = _tracer.BuildSpan(spanName).StartActive(true))
            {
                var result = _usersLogic.GetById(id);

                scope.LogResult("Get user by id", result);

                return(Ok(result));
            }
        }
        public User GetUserById(int id)
        {
            var user = new User();

            try
            {
                user = _userLogic.GetById(id);
            }
            catch (SqlException ex)
            {
                Logger.LogShortErrorInfo(ex);
                return(null);
            }
            return(user);
        }
Example #3
0
        public IActionResult GetSingleUser(int id)
        {
            var result = _usersLogic.GetById(id);

            return(Ok(result));
        }