public ActionResult Create(string str, string returnUrl) { List <MenuItem> menuItems = db.MenuItems.ToList(); decimal cost = 0; string orderlist = ""; foreach (MenuItem menuItem in menuItems) { int count = int.Parse(Request["input-" + menuItem.ID]); while (count > 0) { if (cost > 0) { orderlist += ","; } cost += menuItem.Price; orderlist += menuItem.ID; count--; } } int order_id = OrderUtils.SaveOrder(User.Identity.Name, orderlist); return(RedirectToAction("Confirm", "Order", new { id = order_id })); }