Example #1
0
 public IActionResult GetUser(int id)
 {
     try
     {
         IEnumerable <Users> user = UserModal.GetUserById(id);
         if (user == null)
         {
             return(NotFound());
         }
         else
         {
             return(Ok(user));
         }
     }
     catch (Exception ex) { return(NotFound(ex)); }
 }
Example #2
0
        public User GetUserById(int Id)
        {
            User CurrentUser = userModel.GetUserById(Id);

            return(CurrentUser);
        }