// GET: TeamMetric/Create
        public ActionResult Create()
        {
            var userId   = Guid.Parse(User.Identity.GetUserId());
            var service  = new ScrumTeamService(userId);
            var service2 = new ScrumMasterService(userId);

            List <ScrumTeam> scrumTeams = service.GetScrumTeamList().ToList();

            var query = from c in scrumTeams
                        select new SelectListItem()
            {
                Value = c.TeamId.ToString(),
                Text  = c.TeamName
            };

            List <ScrumMaster> scrumMasters = service2.GetScrumMasterList().ToList();

            var query2 = from c in scrumMasters
                         select new SelectListItem()
            {
                Value = c.ScrumMasterId.ToString(),
                Text  = c.FirstName + c.LastName
            };

            ViewBag.TeamId        = query;
            ViewBag.ScrumMasterId = query2;
            return(View());
        }
        // GET: TeamMetric/Edit
        public ActionResult Edit(int id)
        {
            var service = CreateTeamMetricService();
            var detail  = service.GetTeamMetricById(id);

            var userId   = Guid.Parse(User.Identity.GetUserId());
            var service2 = new ScrumTeamService(userId);
            var service3 = new ScrumMasterService(userId);

            List <ScrumTeam> scrumTeams = service2.GetScrumTeamList().ToList();

            var query = from c in scrumTeams
                        select new SelectListItem()
            {
                Value = c.TeamId.ToString(),
                Text  = c.TeamName
            };

            List <ScrumMaster> scrumMasters = service3.GetScrumMasterList().ToList();

            var query2 = from c in scrumMasters
                         select new SelectListItem()
            {
                Value = c.ScrumMasterId.ToString(),
                Text  = c.FirstName + c.LastName
            };


            var model =
                new TeamMetricEdit
            {
                EvalId              = detail.EvalId,
                TeamId              = detail.TeamId,
                ScrumMasterId       = detail.ScrumMasterId,
                Fiscalyear          = detail.Fiscalyear,
                FiscalQuarter       = detail.FiscalQuarter,
                Velocity            = detail.Velocity,
                BurnUp              = detail.BurnUp,
                ProdSupport         = detail.ProdSupport,
                CustomerRating      = detail.CustomerRating,
                RatingOfPerformance = detail.RatingOfPerformance
            };

            ViewBag.TeamId        = query;
            ViewBag.ScrumMasterId = query2;

            return(View(model));
        }