2
我有這2個接口:LINQ查詢此方案
public interface IShipment
{
IEnumerable<IShippedItem> Contents { get; }
string InvoiceNumber { get; }
}
public interface IShippedItem
{
string ProductCode { get; }
int Quantity { get; }
}
現在,我想寫一個LINQ
聲明讓我只是一個ProductCode
列表。
如何去做這件事?
IEnumerable<IShipment> shipments = GetShipments();
var productCodeList = from shipment in shipment
???????