Exemplo n.º 1
0
        public ActionResult RemovePlayer(string playerId)
        {
            Player player = CSharpDbDAL.GetPlayer(playerId);

            if (player != null)
            {
                CSharpDbDAL.DeletePlayer(player);
            }

            return(RedirectToAction("Search"));
        }
Exemplo n.º 2
0
        public ActionResult RemovePlayer(string playerId)
        {
            Player player = CSharpDbDAL.GetPlayer(playerId,
                                                  CSharpDbDAL.GetContextUser(User.Identity.Name).Id);

            if (player != null)
            {
                CSharpDbDAL.DeletePlayer(player);
            }

            return(RedirectToAction("TeamManagement"));
        }