public ActionResult NewPlayer(string name) { var player = new Player { Name = name }; playerRep.Add(player); playerRep.Save(); return RedirectToRoute(new {controller = "Home", action = "Index"}); }
//Insert/Update public void Add(Player player) { db.Players.InsertOnSubmit(player); }
partial void UpdatePlayer(Player instance);
partial void DeletePlayer(Player instance);
partial void InsertPlayer(Player instance);