コード例 #1
0
        public ActionResult WizardFinish(string wizardId)
        {
            var model       = (WizardModel)Session[wizardId];
            var finishModel = new WizardFinishModel();

            finishModel.WizardId = model.Id;
            finishModel.Name     = model.Step1.Name;

            var category = Db.Categories.SingleOrDefault(o => o.Id == model.Step1.CategoryId);

            if (category != null)
            {
                finishModel.Category = category.Name;
            }

            finishModel.Meals = Db.Meals.Where(o => model.Step2.MealIds.Contains(o.Id)).Select(o => o.Name).ToArray();

            return(View(finishModel));
        }
コード例 #2
0
        public ActionResult WizardFinish(string wizardId)
        {
            var model = (WizardModel)Session[wizardId];
            var finishModel = new WizardFinishModel();

            finishModel.WizardId = model.Id;
            finishModel.Name = model.Step1.Name;

            var category = Db.Categories.SingleOrDefault(o => o.Id == model.Step1.CategoryId);
            if (category != null)
            {
                finishModel.Category = category.Name;
            }

            finishModel.Meals = Db.Meals.Where(o => model.Step2.MealIds.Contains(o.Id)).Select(o => o.Name).ToArray();

            return View(finishModel);
        }