private HighScoresController() { var highscoreRepo = new HighScoresRepo(); _highscoreService = new HighScoresService(highscoreRepo); }
public HighScoresController(IHighScoresService highscoreService) { _highscoreService = highscoreService; }
public HighScoresController(IHighScoresService highScoresService, IMapper mapper) { _highScoresService = highScoresService ?? throw new ArgumentNullException(nameof(highScoresService)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }