public ActionResult RemovePlayer(string playerId) { Player player = CSharpDbDAL.GetPlayer(playerId); if (player != null) { CSharpDbDAL.DeletePlayer(player); } return(RedirectToAction("Search")); }
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")); }