//Ajax call coming GET public ActionResult GetOrderItemsByVendorOrder(int oid) { var currentUser = UserManager.FindById(User.Identity.GetUserId()); var prfileId = currentUser.UserProfile.Id; var supplierId = _merchantService.FindSupplierBy(prfileId).Id; IEnumerable <OrderItem> orderItems = _orderProcessingService.GetOrderItmesByVendorOrder(supplierId, oid); //var customer = _orderProcessingService.GetCustomerByOrderId(oid); //ViewBag.customerEmail = customer.ContactEmail; decimal total = 0; foreach (var item in orderItems) { total = total + item.Product.UnitPrice * item.Quantity; ViewBag.Total = total; } return(PartialView("_OrderItems", orderItems)); }