public async Task<IActionResult> Index()
        {
            var vm = new TeamProjectListVM();
            var defaultProject = await _projectManager.GetDefaultProjectForCurrentTeam();

            vm.Projects = _projectManager.GetProjects(this._userAuthHelper.TeamId).Select(s => new ProjectVM
            {
                Id = s.Id,
                Name = s.Name,
                IsDefaultProject = (defaultProject != null && s.Id == defaultProject.Id)

            }).ToList();

            return View(vm);
        }
        public ActionResult Index()
        {
            try
            {
                var profiler = MiniProfiler.Current;
                var vm = new TeamProjectListVM();
                List<Project> projectList = new List<Project>();
                TeamMember teamMember = new TeamMember();
                using (profiler.Step("Getting list of projects"))
                {
                    projectList = repo.GetProjects(TeamID).ToList(); ;
                }
                    using (profiler.Step("Getting Team member"))
                    {
                         teamMember = repo.GetTeamMember(UserID, TeamID);
                    }
                        using (profiler.Step("Mapping to ViewModels"))
                        {
                            foreach (var project in projectList)
                            {
                                var projectVM = new ProjectVM { Name = project.Name, ID = project.ID };
                                if (teamMember.DefaultProjectID.HasValue)
                                    projectVM.IsDefaultProject = project.ID == teamMember.DefaultProjectID.Value;

                                vm.Projects.Add(projectVM);
                            }
                        }
                    
                
                return View("~/Views/Projects/Index.cshtml",vm);
            }
            catch (Exception ex)
            {
                log.Error(ex);
                return View("Error");
            }
        }