private GetGame ( long id ) : System.Web.Mvc.ActionResult | ||
id | long | |
return | System.Web.Mvc.ActionResult |
public ActionResult GetGame(long id)
{
var game = GetChessGame(id);
if (game == null)
throw new ArgumentException(String.Format("Game {0} does not exist.", id));
var model = GetGameModel(game);
return Json(model, JsonRequestBehavior.AllowGet);
}