예제 #1
0
        public Player DeletePlayer(int playerId)
        {
            Player deletedPlayer = _context.Players.Find(playerId);

            if (deletedPlayer != null)
            {
                _context.Remove(deletedPlayer);
                _context.SaveChanges();
            }
            return(deletedPlayer);
        }
예제 #2
0
        public Match DeleteMatch(int matchId)
        {
            Match deletedMatch = _context.Matches.Find(matchId);

            if (deletedMatch != null)
            {
                _context.Remove(deletedMatch);
                _context.SaveChanges();
            }
            return(deletedMatch);
        }
예제 #3
0
        public Team DeleteTeam(int teamId)
        {
            Team deletedTeam = _context.Teams.Find(teamId);

            if (deletedTeam != null)
            {
                _context.Remove(deletedTeam);
                _context.SaveChanges();
            }
            return(deletedTeam);
        }
        public PlayerMatchTime DeletePlayerMatch(int playerMatchId)
        {
            PlayerMatchTime deletedPlayerMatchTime = _context.Player_Match_Time.Find(playerMatchId);

            if (deletedPlayerMatchTime != null)
            {
                _context.Remove(deletedPlayerMatchTime);
                _context.SaveChanges();
            }
            return(deletedPlayerMatchTime);
        }