public void OnGet() { IEnumerable <Order> OrderList = orderDataAccess.GetAll(); foreach (var Order in OrderList) { Flower OrderFlower = flowerDataAccess.GetById(Order.FlowerID); OrderListWithFlowerDetails.Add(new OrderWithFlowerDetails(Order, OrderFlower)); } }