// GET: Product public ActionResult Index() { if (Athurize.CheckNotLogin()) { return(RedirectToAction("Registration", "Home")); } if (Athurize.CheckUser()) { return(RedirectToAction("Index", "Home")); } var model = db.GetAll().ToList(); var category = catdb.GetAll().ToList(); ViewBag.category = category; var img = imgdb.GetAll().ToList(); ViewBag.Img = img; return(View(model)); }
public ActionResult Index() { IEnumerable <ProductMG> model = productMGRepository.GetAll(); return(View(model)); }