public IHttpActionResult Get(int id) { var service = new GameService(new BlockService(new TaxonomyService())); var game = service.GetGame(id); if (game == null) return NotFound(); return Ok(game); }
private Game Part(int taxonomy, int part) { Game game = null; if (part == 0) { var service = new GameService(new BlockService(new TaxonomyService())); game = service.GetGame(taxonomy); TempData["game"] = game; } game = TempData["game"] as Game; if (game == null || game.SetBucket.Count < part) return null; return game; }