public ActionResult DeleteGame(int id) { var gameFromRepo = _repository.GetGameById(id); if (gameFromRepo == null) { return(NotFound()); } _repository.DeleteGame(gameFromRepo); _repository.saveChanges(); return(NoContent()); }
public void DeleteGame(Game game) { repo.DeleteGame(game); }