// GET: Order public ActionResult Index() { OrderService os = new OrderService(); customer customer = new customer { idUser = us.getCurrentUserID() }; List <order> orders = new List <order>(); foreach (var item in os.getOrdersByCustomer(customer)) { if (item.idu == customer.idUser) { orders = item.orders; } } return(View(orders)); }