public ActionResult Add(OrderItemViewModel itemVM) { Session["itemVM"] = itemVM; Session["List"] = TempData["List"]; var order = service.temporaryList(itemVM, (List <OrderItemViewModel>)TempData["List"]); TempData["List"] = order.orderItem; TempData.Keep(); return(Json(order, JsonRequestBehavior.AllowGet)); }
public OrderViewModel temporaryList(OrderItemViewModel itemVM, List <OrderItemViewModel> ListItem) { var result = service.temporaryList(itemVM, ListItem); return(result); }