pauleq
pauleq
CC#
Created by pauleq on 5/23/2023 in #help
❔ Need help with a linq query
Hello, why does this query return nothing List<Product> failedOrders = ( from order in orderData from warehouse in warehouseData from product in warehouse.Products where product.ProductName == order.OrderName && product.Price <= order.PriceLimit && product.Quantity >= order.OrderQuantity select new Product(product.ProductName, product.Quantity, product.Price) ).GroupBy(p => p.ProductName) .Where(g => g.Sum(p => p.Quantity) < ( from o in orderData where o.OrderName == g.Key select o.OrderQuantity ).First()) .SelectMany(g => g) .ToList();
6 replies
CC#
Created by pauleq on 2/28/2023 in #help
❔ Help with C# TSP recursive method
4 replies