public ActionResult AddEditTeam(int?teamId) { var team = new TeamViewModel(); try { if (teamId != null) { return(View(_teamService.GetTeamById(teamId.Value))); } team.TeamMembers.Insert(0, new TemaMemberModel()); return(View(team)); } catch (System.Exception) { throw; } }