week3/RpsFollowAlong/BusinessLogic/BusinessLogic.cs
/// <summary>
/// returns a list of playerviewmodels for every player in the db
/// </summary>
/// <returns></returns>
returns a list of playerviewmodels for every player in the db
returns a list of playerviewmodels for every player in the db
public List<PlayerViewModel> GetAllPlayerViewModels()
        {
            List<Player> allPlayers = _repository.GetAllPlayers();
            List<PlayerViewModel> allPlayerViewModels = new List<PlayerViewModel>();
            foreach(Player player in allPlayers)
            {
                var playerViewModel = _mapper.ConvertPlayerToPlayerViewModel(player);
                allPlayerViewModels.Add(playerViewModel);
            }
            return allPlayerViewModels;
        }
public List < PlayerViewModel > GetAllPlayerViewModels ( ) { List < Player > allPlayers = _repository . GetAllPlayers ( ) ; List < PlayerViewModel > allPlayerViewModels = new List < PlayerViewModel > ( ) ; foreach ( Player player in allPlayers ) { var playerViewModel = _mapper . ConvertPlayerToPlayerViewModel ( player ) ; allPlayerViewModels . Add ( playerViewModel ) ; } return allPlayerViewModels ; }
returns a list of playerviewmodels for every player in the db
returns a list of playerviewmodels for every player in the db
None