public ActionResult AddExerciseToWorkout(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var serv = new ExerciseService(userId); List <Exercise> exercises = serv.GetExerciseNameList().ToList(); var query = from c in exercises select new SelectListItem() { Value = c.ExerciseId.ToString(), Text = c.ExerciseName }; ViewBag.ExerciseId = query; return(View()); }