Ejemplo n.º 1
0
 public void Update(Player player)
 {
     var existedPlayer = _playerRepository.GetById(player.Id);
     existedPlayer.CopyFrom(player);
     _playerRepository.Update(existedPlayer);
 }
Ejemplo n.º 2
0
 public void CopyFrom(Player player)
 {
     FirstName = player.FirstName;
     LastName = player.LastName;
     MiddleName = player.MiddleName;
     DateOfBirth = player.DateOfBirth;
     Country = player.Country;
     City = player.City;
     ForehandRight = player.ForehandRight;
     Gender = player.Gender;
     Height = player.Height;
     Weight = player.Weight;
     PlayFrom = player.PlayFrom;
     Level = player.Level;
     Deleted = player.Deleted;
 }
Ejemplo n.º 3
0
 public void Delete(Player player)
 {
     player.Deleted = true;
     _playerRepository.Update(player);
 }
Ejemplo n.º 4
0
 public void Add(Player player)
 {
     _playerRepository.Insert(player);
 }
Ejemplo n.º 5
0
 public TournamentPlayer(Tournament tournament, Player player)
 {
     this.Tournament = tournament;
     this.Player = player;
 }
 public void AddPlayer(Tournament tournament, Player player)
 {
     var tournamentPlayer = new TournamentPlayer(tournament, player);
     _tournamentPlayerRepository.Insert(tournamentPlayer);
 }
 public void UpdatePlayer(Tournament tournament, Player player)
 {
     var tournamentPlayer = _tournamentPlayerRepository.Table.Where(tp => tp.Tournament.Id == tournament.Id && tp.Player.Id == player.Id).ToList();
     _tournamentPlayerRepository.Update(tournamentPlayer);
 }