Example #1
0
        private void UpdateUnassignedToPlayer(string initialId, Player player)
        {
            var userId = player.UserId;

            _playerRepository.RemovePlayer(initialId);
            _playerRepository.SavePlayer(player);

            _userTypeRepository.RemovePlayerTypeRecord(initialId);
            _userTypeRepository.SaveUserType(userId, UserType.Player, player.CoachId);

            var goals = _goalsRepository.GetGoals(initialId);

            _goalsRepository.RemoveGoals(initialId);
            _goalsRepository.SaveGoals(userId, goals);
        }