public IActionResult OnPost(string userId)
 {
     if (!ModelState.IsValid)
     {
         return(Page());
     }
     teamData.AddUserToTeam(userId, TeamId, IsLeader);
     return(RedirectToPage("./UsersList"));
 }
        private void AddNewUsersToTeam(OmadaTeam team)
        {
            var selectedUsers = NotTeamMembers.Where(u => u.IsSelected == true).Select(u => u.User.Id).ToList();

            foreach (var user in selectedUsers)
            {
                teamData.AddUserToTeam(user, team.Id, 0);
            }
        }