public CartViewModel GetCVM(int userId) { Order order = GetOrderForCart(userId); CartViewModel cvm = new CartViewModel(); cvm.Price = 0; if (order == null) { cvm.isEmpty = true; } else { cvm.isEmpty = false; cvm.OrderId = order.Id; cvm.Price = GetOrderPriceByOrderId(order.Id); cvm.orderItems = OIRepo.GetOrderItemsByOrderId(cvm.OrderId); } cvm.SetTaxTotal(); return(cvm); }