如何将此查询从 sql 更改为 linq?
category
select distinct prodCategory from table4
subcategory
SELECT distinct [prodSubCat] FROM [table4] WHERE ([prodCategory] = @prodCategory)
prodCategory prodSubCat
-------------------------------------
Home Cassette Receiver
Home Receiver
Home cd player
Home cd player
Home Receiver
Car dvd player
Car GPS
前任。
我的目标是为 prodCategory = "Car" 获取 prodSubCat
Car dvd player
Car GPS