public IActionResult Update(string id, TournamentD game) { var tour = _tournamentService.Get(id: id); if (tour == null) { return(NotFound()); } _tournamentService.Update(id, game); return(NoContent()); }
public void Remove(TournamentD tour) => _tournament.DeleteOne(book => book.TournamentId == tour.TournamentId);
public void Update(string id, TournamentD tour) => _tournament.ReplaceOne(book => book.TournamentId == id, tour);
public TournamentD Create(TournamentD tour) { _tournament.InsertOne(tour); return(tour); }
public ActionResult <TournamentD> Create(TournamentD tour) { _tournamentService.Create(tour); return(CreatedAtRoute(new { id = tour.TournamentId.ToString() }, value: tour)); }