public ActionResult AddProducts(UserUserProduct uup) { // TODO: Add insert logic here UserProductManager.Insert(uup.UserProduct); return(RedirectToAction("Index")); }
// GET public ActionResult AddProducts() { if (Authenticate.IsAuthenticated()) { UserUserProduct uup = new UserUserProduct(); uup.User = Session["user"] as User; uup.Products = ProductManager.Load(); uup.UserProduct = new UserProduct(); uup.UserProduct.UserId = uup.User.Id; return(View(uup)); } return(View("Index")); }