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)); } }
public User GetUserById(int Id) { User CurrentUser = userModel.GetUserById(Id); return(CurrentUser); }