public ActionResult PlacePieces(PlacePiecesViewModel model) { if (!ModelState.IsValid) { return(View(model)); } return(RedirectToAction("PlayGame", new { id = model.GameId })); }
public ActionResult PlacePieces(Guid id) { //TODO Load the game from the database to make sure it is a real game and ready to place pieces var model = new PlacePiecesViewModel { GameId = id, //For this example I am only using one piece Pieces = new List <PieceViewModel> { new PieceViewModel() } }; return(View(model)); }