public Player DeletePlayer(int playerId) { Player deletedPlayer = _context.Players.Find(playerId); if (deletedPlayer != null) { _context.Remove(deletedPlayer); _context.SaveChanges(); } return(deletedPlayer); }
public Match DeleteMatch(int matchId) { Match deletedMatch = _context.Matches.Find(matchId); if (deletedMatch != null) { _context.Remove(deletedMatch); _context.SaveChanges(); } return(deletedMatch); }
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); }