12
在项目选择我有这个表:Linq。从多个表
- 产品(ID,采用catalogId,manufacturerId ...)
- 目录
- 厂商
而且Product
模型(id, name, catalogId, catalogTitle, manufacturerId, manufacturerName)
。
如果我想获得产品项目,如何在Linq中写下这个SQL查询?
SELECT Product.Name, Product.CatalogId, Product.ManufacturerId, [Catalog].Name, Manufacturer.Name
FROM Product, [Catalog], Manufacturer
WHERE [Catalog].Id=Product.CatalogId AND Manufacturer.id=Product.ManufacturerId AND Product.Active=1
发生了什么事情加入? http://www.dotnetperls.com/join – TigOldBitties
@TigOldBitties我最近编辑了我的问题。我想获得产品项目。 –
无论你想要得到什么,该问题仍然适用。 – TigOldBitties