public ActionResult Create() { if (Request.Cookies["MagazineId"].Value == null) { SetMessage("Lo sentimos, ha ocurrido un error. Inténtelo de nuevo.", BootstrapAlertTypes.Danger); return(RedirectToAction("Index", "Magazines")); } int magId = Int32.Parse(Request.Cookies["MagazineId"].Value); ViewBag.DataParentId = new SelectList(db.Datas().Where(x => x.MagazineId == magId).Where(x => !x.IsDeleted).Where(x => x.DataParentId == null), "DataId", "Title"); return(View()); }