public List <Player> SearchPlayersHelper(RegionalVoteViewModel viewModel) { List <Player> playerList = iPlayerRepo.ListAllPlayers(); playerList = playerList.Where( p => p.TeamPlayers.All( tp => tp.team.SchoolID == viewModel.SchoolID)).ToList <Player>(); //Search gender and Search End Date if (viewModel.Position != null) { playerList = playerList.Where( p => p.Position == viewModel.Position).ToList <Player>(); } return(playerList); }
public List <Player> ListAllPlayersHelper() { List <Player> playerList = iPlayerRepo.ListAllPlayers(); return(playerList); }