我有一个LINQ问题。我对linq不太了解。我有两个类:LINQ加入不同的结果集
[Person]
string FirstName {get;set;}
string LastName {get;set;}
IEnumerable<State> LastName {get;set;}
[State]
int StateID {get;set;}
string StateName {get;set;}
我想编写一个LINQ查询,它将返回所有“Person”类的不同状态列表。 SQL中的一个例子是
SELECT DISTINCT s.StateID
FROM Person p
JOIN States s ON (p.StateID = s.StateID)
任何帮助,将不胜感激。
感谢回答,因为你已经说过,关键是要创建自己的实现。 – TheWebGuy 2012-02-16 15:12:34