0
该查询如何从sql更改为linq?在Linq中使用Distinct到SQL
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
Ex。
我的目标是让prodSubCat为prodCategory = “驾驶”
Car dvd player
Car GPS
table4.AsEnumerable()。 – terrybozzio
@terrybozzio table4是一个实体。 –