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)); }
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); }