Join() public method

public Join ( int accountId, string name, int rating ) : Player
accountId int
name string
rating int
return Player
Exemplo n.º 1
0
        public ActionResult Create(Game model)
        {
            if (ModelState.IsValid)
            {
                GameServer.SaveNewGame(model);

                model.Join(Account.Id, Account.Name, Account.Rating);
                GameServer.PlayerJoined(model, Account.Id);

                return Redirect("/Game-" + model.Id + "/");
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }