// GET api/<controller>/5
        public LessonPackViewModel Get(int id)
        {
            Pack pack = db.Packs.Find(id);

            if (pack == null)
            {
                ThrowNotFound();
                return null;
            }

            LessonPackViewModel packViewModel = new LessonPackViewModel();

            //packViewModel.Title = GetPackTitle(pack);
            //packViewModel.SubTitle = GetCourseName(pack);
            packViewModel.PackViewModels = new List<PackViewModel>();

            if (pack.PackTypeId == 1)
            {
                for (int i = 0; i < pack.Groups.Count; i++)
                {
                    packViewModel.PackViewModels.Add(CreateLessonsPackModel(pack, i, pack.Groups[i].Name));
                }
            }
            else if (pack.PackTypeId == 2)
            {
                var packModel = CreateLessonsPackModel(pack, 0, null);
                AppendLabsPackModel(pack, packModel);
                //packViewModel.PackViewModels.Add(packModel);
                packViewModel.PackViewModels.Add(packModel);
            }

            return packViewModel;
        }
        //
        // GET: /Pack/
        public ActionResult Index(int id, int selection = 0)
        {
            Pack pack = db.Packs.Find(id);

            if(pack == null)
            {
                return HttpNotFound();
            }

            LessonPackViewModel packViewModel = new LessonPackViewModel();

            packViewModel.Id = id;
            packViewModel.Title = GetPackTitle(pack);
            packViewModel.SubTitle = GetCourseName(pack);
            packViewModel.PackViewModels = new List<PackViewModel>();

            return View(packViewModel);
        }