【发布时间】:2009-05-28 09:42:21
【问题描述】:
我真正想要的是像 Scott Gu 的博客中那样将这两个表选择为匿名类型:here 但是,我会满足于这种创建的类型“ActiveLots”我将两个表连接在一起并希望能够从我的结果集中引用每个列。
我似乎没有正确理解语法。
Dim pi = From p In dc.Inventories Join i In dc.InventoryItems On p.InventoryItemID _
Equals i.InventoryItemID Where p.LotNumber <> "" _
Select New ActiveLots LotNumber = p.LotNumber, Quantity = p.Quantity, Item = i.Item, Uom = i.UnitofMeasure, Description = i.Description
【问题讨论】:
标签: vb.net linq anonymous-types