//
        // POST: /Team/Create

        public ActionResult Create([Bind(Exclude = "TeamID")] Team newTeam)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            try
            {
                //do not allow to create duplicate team name
                if (GetTeamByName(newTeam.TeamName) == null)
                {
                    _dataModel.AddToTeams(newTeam);
                    _dataModel.SaveChanges();
                }

                return(View());
            }
            catch
            {
                return(View());
            }
        }