示例#1
0
        /**/

        /*
         * NAME:
         *      GetUserFullName - returns the name of the user with the given id
         * SYNOPSIS:
         *      GetUserFullName(string userId)
         *           userId --> the id of the user whose full name is to be returned
         * DESCRIPTION:
         *      This function returns the full name of the user with the given id
         * RETURNS
         *      a string containing the user's full name
         * AUTHOR
         *      Biplab Thapa Magar
         * DATE
         *      10/04/2020
         * /
         * /**/
        private string GetUserFullName(string userId)
        {
            var user         = _usersRepo.GetUserById(userId);
            var userFullName = user.FirstName + " " + user.LastName;

            return(userFullName);
        }
        public IActionResult GetUserById(string userId)
        {
            var user = _usersRepo.GetUserById(userId);

            return(Ok(user));
        }