Exemple #1
0
        public PO_Player Map(PlayerDAO _PlayerToMap)
        {
            PO_Player _PlayerToReturn = new PO_Player();

            _PlayerToReturn.PlayerName      = _PlayerToMap.PlayerName;
            _PlayerToReturn.PlayerFirstName = _PlayerToMap.PlayerFirstName;
            _PlayerToReturn.PlayerLastName  = _PlayerToMap.PlayerLastName;
            _PlayerToReturn.PlayerCity      = _PlayerToMap.PlayerCity;
            _PlayerToReturn.PlayerState     = _PlayerToMap.PlayerState;
            _PlayerToReturn.PlayerAge       = _PlayerToMap.PlayerAge;
            _PlayerToReturn.PlayerPassword  = _PlayerToMap.PlayerPassword;
            _PlayerToReturn.FKRoleID        = _PlayerToMap.FKRoleID;

            return(_PlayerToReturn);
        }
Exemple #2
0
        //Player View mapper
        public List <PO_Player> Map(List <PlayerDAO> _dataPlayers)
        {
            List <PO_Player> _PressPlayer = new List <PO_Player>();

            foreach (PlayerDAO _dataPlayer in _dataPlayers)
            {
                PO_Player _Player = new PO_Player();
                _Player.PlayerName      = _dataPlayer.PlayerName;
                _Player.PlayerFirstName = _dataPlayer.PlayerFirstName;
                _Player.PlayerLastName  = _dataPlayer.PlayerLastName;
                _Player.PlayerCity      = _dataPlayer.PlayerCity;
                _Player.PlayerState     = _dataPlayer.PlayerState;
                _Player.PlayerAge       = _dataPlayer.PlayerAge;

                _PressPlayer.Add(_Player);
            }
            return(_PressPlayer);
        }