Exemplo n.º 1
0
        public ActionResult DeleteGame(int id)
        {
            var gameFromRepo = _repository.GetGameById(id);

            if (gameFromRepo == null)
            {
                return(NotFound());
            }

            _repository.DeleteGame(gameFromRepo);
            _repository.saveChanges();

            return(NoContent());
        }
Exemplo n.º 2
0
 public void DeleteGame(Game game)
 {
     repo.DeleteGame(game);
 }