public void getAllPlayers() { IPlayerDal dal = PlayerFactory.GetPlayerDal(); foreach (var a in dal.GetPlayerList().players) { players.Add(new Player() { Id = a.Id, LastName = a.LastName, FirstName = a.FirstName, ActiveTeam = a.ActiveTeam, Games = a.Games, Points = a.Points, Rebounds = a.Rebounds, Assists = a.Assists, Blocks = a.Blocks, }); } }
public PlayerCollection() { dal = PlayerFactory.GetPlayerDal(); players = new List <Player>(); }